1

I would like to ask you how to change following iptable rule: iptables -t nat PREROUTING --source x.x.x.x/24 -p tcp -m tcp --dport 443 -j DNAT --to x.x.x.x:8080 to pf. I am trying to capture

1
  • 1
    There're 2 kinds of PFs in use: modern OpenBSD's PF and legacy-PF which has been ported to a variety of other OSes. Answer would depend on target version hence. – poige Nov 21 '19 at 15:20
1

With that info, it could be something like this, where x would be the ips:

nat pass on eth0 proto tcp from x.x.x.x/24 to any port 443 rdr-to x.x.x.x port 8080

from would specify the source.

to the destination with the port

the part of rdt-to would specify the redirection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.