Hi
I would like to do the following and hope some can give some advice.
- Log any new incoming traffic on two known ports on my system.
- I only need the ip address that connects, no more info is needed.
- I don't need to know how often, so no duplicates of a single ip address is needed.
Meaning - If it's already logged, don't bother log it again. Hence the "new" in the first line here.
- Ignore (don't log) a list of "known" ip addresses
Is this possible? (The duplicate and known list stuff...)
I think I need to set up my own chain and build the rules in it, then apply it like this :
Code:
iptables -A INPUT -p tcp --dport 1234 -j LOGNEW
(where LOGNEW is my chain)
The reason is to monitor traffic to these two ports, if any, from others then the ip's on the known list.
I know I should just allow traffic in from the known list and block the rest, but they are on dhcp so...
Even just a hint in the right direction here would be very nice.
Thank you