Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
monitoring attempts to local iface
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
sumpi
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2006
Posts: 110
Location: Graz, Austria

PostPosted: Sat Nov 24, 2007 9:30 am    Post subject: monitoring attempts to local iface Reply with quote

Hi all!

I want to set up my box in a way that it informs me, if a connection attempt is being done from the outside. I have to use my laptop at different locations with unsecured LANs. So it should be like on win running a firewall in "learning mode", which will ask, if there is an atempt from the outside to connect to my box which is not known...
I do not need to change the rules of my shorewall, but I would like to be informed.
Another thing, I would like to set up is a monitor of my lan at home, which uses both, cables and wifi. The thing is, that there are two flats connected via cable and if there is for example a wifi ap connected in the other flat, I should be informed.
Which tool should I use to find out, if a new connection is established or something similar? Maybe it can inform me by mail or at least log the connections and changes in a file.

Thanks in advance for any hints!

Bye,
Sumpi
_________________
Why geeks like computers:
unzip, strip, touch, finger, grep, mount, fsck, more, yes,fsck,fsck,fsck,umount, sleep.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23066

PostPosted: Sat Nov 24, 2007 5:58 pm    Post subject: Reply with quote

You can record connection attempts by adding a rule with a LOG target to your INPUT chain. This should be placed right before the DROP target, so that you do not log all the traffic that you are allowing. This will cause the kernel to print a log message when a packet matches. Your system logger can write this to a file. The system logger is probably already configured to do this.

I do not know of a way to directly alert the user of an incoming connection attempt. If none exists, you could create one by monitoring the log file for new messages about dropped packets and generating an alert to the user when a message is added. Something like:tail --follow=name /var/log/kern.log | grep 'FW-connection-alert ' | xargs -d '\n' -n1 xmessage. This requires sys-apps/coreutils, sys-apps/grep, sys-apps/findutils, and x11-apps/xmessage.
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