View previous topic :: View next topic |
Author |
Message |
XST1 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 27 Jan 2004 Posts: 163
|
Posted: Mon Jan 03, 2005 4:24 am Post subject: logging ips that connect to my machine |
|
|
I'm going to be using realVNC 4.0 soon but it doesn't support IP logging. Is there a program out there that can log IPs that connect to my machine? Thanks. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Reggie n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Jan 2005 Posts: 8 Location: Townsville
|
Posted: Mon Jan 03, 2005 7:21 am Post subject: |
|
|
Put a logging rule in your firewall such as:
Code: |
iptables -A INPUT -p tcp --dport <vnc port> -j LOG --log-level debug --log-prefix "IN-VNC: "
|
Replacing <vnc port> with the port your server is on.
Your /var/log/kernel/current log will then get entries like:
IN-VNC: IN=ppp0 OUT= MAC= SRC=130.13.220.9 DST=128.130.22.25 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=12944 DF PROTO=TCP SPT=1148 DPT=135 WINDOW=16384 RES=0
x00 SYN URGP=0 From which you can then extract the source ip address.
Alternatively you could look into the ulogd firewall target which can log packets to a database for easy processing. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
racoontje Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 Jul 2004 Posts: 1290
|
Posted: Mon Jan 03, 2005 8:23 am Post subject: |
|
|
If you want to see what's happening right now, however, netstat is what you need ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|