Wouter Deurholt
2017-01-11 20:47:58 UTC
Hi,
I need a iptables rule translated in a shorewall rule that filters on a port and a hex pattern. The rule is used to filter out packets send to a specific port (udp 53) to a specific subdomain (the hex pattern) to be forwarded it to another port where it will be handled by a program that listens to that (other) port (5353). I cannot seem to find out the right rule. Second, I'm unsure where to place it in my 'rules' file. Please your help / advice.
The rule:
iptables -t nat -A PREROUTING -p udp --dport 53 -m string --algo bm --from 20 --hex-string "|024a4a0364615000|" -j REDIRECT --to-ports 5353
Thanks in advance,
Wouter
---- ---- ---- ---- ---- ---- ---- ----
| Wouter Y. Deurholt | [***@wdmail.nl](http://wdmail.nl) | Secured by [ProtonMail](https://protonmail.com) |
I need a iptables rule translated in a shorewall rule that filters on a port and a hex pattern. The rule is used to filter out packets send to a specific port (udp 53) to a specific subdomain (the hex pattern) to be forwarded it to another port where it will be handled by a program that listens to that (other) port (5353). I cannot seem to find out the right rule. Second, I'm unsure where to place it in my 'rules' file. Please your help / advice.
The rule:
iptables -t nat -A PREROUTING -p udp --dport 53 -m string --algo bm --from 20 --hex-string "|024a4a0364615000|" -j REDIRECT --to-ports 5353
Thanks in advance,
Wouter
---- ---- ---- ---- ---- ---- ---- ----
| Wouter Y. Deurholt | [***@wdmail.nl](http://wdmail.nl) | Secured by [ProtonMail](https://protonmail.com) |