Hello,
I have these lines in my firewall script that permits some ip's to get to the website but denies others based on countries and such (ipset sets)...
Would using matchset DIRECTLY on the PREROUTING chain work ?
It would give something like this:
I have these lines in my firewall script that permits some ip's to get to the website but denies others based on countries and such (ipset sets)...
Code:
in the nat table:
-A PREROUTING -d xxx.15.207.xxx/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.25:80
in the filter table:
-A FORWARD -m conntrack --ctstate DNAT -m set --match-set BlockedCountries src -j DROP
Would using matchset DIRECTLY on the PREROUTING chain work ?
It would give something like this:
Code:
-A PREROUTING -d xxx.15.207.xxx/32 -p tcp -m tcp --dport 80 -m set --match-set BlockedCountries src -j DNAT --to-destination www,xxx,yyy,zzz:80
-A PREROUTING -d xxx.15.207.xxx/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.25:80