Policy Accept + Allow Multiple IP's

Rudi Starcevic tech at wildcash.com
Tue Nov 16 01:51:57 CET 2004


Hi,

I have an Iptables firewall with a default policy of accept.

I want to allow only certain IP's ssh access.

So far I have this rule which allows 1 ip:

iptables -A INPUT -p tcp --dport 22 -s ! xxx.xxx.xxx.xxx -j DROP

I'm not sure how to list more that 1 allowable IP.

This is a production box I've inherited so I'm hoping to work with I already
have but may need to look at changing the default policy to drop or 
something.

Please advise, many thanks.
Regards Rudi






More information about the netfilter mailing list