4

In Linux, you can do NAT port redirection with a command like this:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8000

What is the equivalent with BSD's PF?

2

You can do it like this with Packet Filter :

pass in on em0 proto tcp from any to any port 80 rdr-to 192.168.1.20 port 8000

Change em0 with your network interface, and change the IP address to suit your needs.

Read more : http://www.openbsd.org/faq/pf/rdr.html#filter

Your Answer

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