Hello,
I have my machine configured to allow all traffic in INPUT table, but
I would like to block access to port tcp22 from all besides several
ip's.
The following rules as the basic of what I'm trying to achieve:
/sbin/iptables -A INPUT -s ! a.b.c.d/29 -p tcp --dport 22 -j DROP
/sbin/iptables -A INPUT -s ! e.f.g.h -p tcp --dport 22 -j DROP
How can I do a "AND" between them as in
if (-s ! a.b.c.d/29 AND -s ! e.f.g.h) then -j DROP ?
Thank you,
Maxim.
--
Cheers,
Maxim Veksler
"Free as in Freedom" - Do u GNU ?
I have my machine configured to allow all traffic in INPUT table, but
I would like to block access to port tcp22 from all besides several
ip's.
The following rules as the basic of what I'm trying to achieve:
/sbin/iptables -A INPUT -s ! a.b.c.d/29 -p tcp --dport 22 -j DROP
/sbin/iptables -A INPUT -s ! e.f.g.h -p tcp --dport 22 -j DROP
How can I do a "AND" between them as in
if (-s ! a.b.c.d/29 AND -s ! e.f.g.h) then -j DROP ?
Thank you,
Maxim.
--
Cheers,
Maxim Veksler
"Free as in Freedom" - Do u GNU ?