Home > other >  Iptables how to optimize the following written
Iptables how to optimize the following written

Time:09-19

-a INPUT -s 192.18.1.0/24 -p TCP -- dport 80 - m state - the state NEW and ESTABLISHED -j ACCEPT
- A OUTPUT - d 192.18.1.0/24 -p TCP -- sport 80 - m state - the state ESTABLISHED -j ACCEPT

-a INPUT -s 192.18.2.0/24 -p TCP -- dport 80 - m state - the state NEW and ESTABLISHED -j ACCEPT
- A OUTPUT - d 192.18.2.0/24 -p TCP -- sport 80 - m state - the state ESTABLISHED -j ACCEPT

-a INPUT -s 192.18.3.0/24 -p TCP -- dport 80 - m state - the state NEW and ESTABLISHED -j ACCEPT
- A OUTPUT - d 192.18.3.0/24 -p TCP -- sport 80 - m state - the state ESTABLISHED -j ACCEPT

I want to let
192.18.1,,,,
192.18.2,,,,
192.18.3,,,,
All of the IP can be accessed through port 80 Linux server, I just the wording, more concise writing?

  • Related