Quantcast
Channel: What is the difference between these 2 iptables rules? - Server Fault
Viewing all articles
Browse latest Browse all 4

Answer by AngryWombat for What is the difference between these 2 iptables rules?

$
0
0

line 1 of First Set will allow INBOUND port 22 traffic if connection = NEW CONNECTION.Line 2 of First set seems to be not necessary due to only allows port 22 traffic for a set network range also must be a new connections. Howver the previous rule on line 2 has already allowed the traffic through.
This seem wrong or incomplete

2nd set line 1, Allow INBOUND traffic on the0 if port = 22 and is new or established connectionsLine 2, Alllow OUTBOUND traffic if device = eth0 & port = 22 & connection is established

This will allow SSH connections to this host and will also allow outgoing SSH.

2 nd set is your better option


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>