View previous topic :: View next topic |
Author |
Message |
XST1 Apprentice
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 |
|
|
Reggie n00b
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 |
|
|
racoontje Veteran
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 |
|
Back to top |
|
|
|