Re[2]: SSH allow only form selected IP'
Kev <[email protected]> Sat, 14 Aug 2004 17:54:00 +0600
| Newsgroups | org.kernel.vger.linux-config,org.kernel.vger.linux-admin |
|---|---|
| Message-ID | <[email protected]> |
>> >>anyway i can do this with the SSH config ? >> >>i can use the iptabel rules for 2-3 IP rangers ? >> >> >Have a read of: >http://www.oreilly.com/catalog/sshtdg/chapter/ch08.html#45775 > >The firewall rules yes you can do more than one subnet: > >iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s >192.168.0.0/24 --dport 22 -j ACCEPT >iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d >192.168.0.0/24 --sport 22 -j ACCEPT > >iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s >10.0.0.0/24 --dport 22 -j ACCEPT >iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d >10.0.0.0/24 --sport 22 -j ACCEPT > thanks a lot James, its working fine.... thanks for the help. ------- Web Hosting at a cheap price, starting at $1 per month with your own domain, .COM, .NET, .LK, .ORG etc.. PHP, CGI, Perl, MySQL, Cpanel 9, POP3, POP3s, SMTP, IMAP, FTP, http://www.orbitsl.net