Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
logging ips that connect to my machine
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
XST1
Apprentice
Apprentice


Joined: 27 Jan 2004
Posts: 163

PostPosted: Mon Jan 03, 2005 4:24 am    Post subject: logging ips that connect to my machine Reply with quote

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
View user's profile Send private message
Reggie
n00b
n00b


Joined: 03 Jan 2005
Posts: 8
Location: Townsville

PostPosted: Mon Jan 03, 2005 7:21 am    Post subject: Reply with quote

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
View user's profile Send private message
racoontje
Veteran
Veteran


Joined: 19 Jul 2004
Posts: 1290

PostPosted: Mon Jan 03, 2005 8:23 am    Post subject: Reply with quote

If you want to see what's happening right now, however, netstat is what you need :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum