I have an ipset
named allowList
.
I want to allow every connection to my machine on every port but port 80
, which there I want to allow connections only to the ipset: allowList
.
I want to target only the SYN
packets from port 80 for efficiency,
so that:
- if tcp flag =
SYN
- if port is
80
- if it matches the ipset named
allowList
Then allow the connection, otherwise drop the packet (if the packet is SYN
80
and not matched the allowList
).
The order is important for efficiency, because I dont want to filter or to slow down an established connection.
I'm trying to write iptables rules for it.