26 Nov 2011 at 15:29 #1 RomanNose RomanNose Soldato Joined 20 Aug 2010 Posts 8,201 Can anyone quickly write down a rule that will block all incoming traffic to a certain port except from a certain source IP?
Can anyone quickly write down a rule that will block all incoming traffic to a certain port except from a certain source IP?
26 Nov 2011 at 19:39 #2 ncjok ncjok Associate Joined 17 Jan 2004 Posts 483 Code: iptables -A INPUT -p tcp ! -s 192.168.1.2/32 --dport 22 -j DROP Adjust the protocol, 'trusted' source IP and destination port as appropriate.
Code: iptables -A INPUT -p tcp ! -s 192.168.1.2/32 --dport 22 -j DROP Adjust the protocol, 'trusted' source IP and destination port as appropriate.