lyna
March 15th, 2007, 04:02 AM
Hi all,
I'd like to see when someone out of the ordinary uses ssh to my Ubuntu server. I've set a rule to log these attempts, i.e.
iptables -A INPUT -m state --state NEW -s ! 123.456.789.0/24 -p tcp -ddport ssh -j LOG
I'd like to limit this further to only a few addresses within the 123.456.789.0 network, but I can't figure if that's possible. Is there such a thing as an "and" or "or" within iptables? What I'd like to know about is anyone other than 123.456.789.10 and 123.456.789.20, rather than the entire subnet. Can this be done, and how?
Cheers,
Lyn
I'd like to see when someone out of the ordinary uses ssh to my Ubuntu server. I've set a rule to log these attempts, i.e.
iptables -A INPUT -m state --state NEW -s ! 123.456.789.0/24 -p tcp -ddport ssh -j LOG
I'd like to limit this further to only a few addresses within the 123.456.789.0 network, but I can't figure if that's possible. Is there such a thing as an "and" or "or" within iptables? What I'd like to know about is anyone other than 123.456.789.10 and 123.456.789.20, rather than the entire subnet. Can this be done, and how?
Cheers,
Lyn