Answer the question
In order to leave comments, you need to log in
How can I change the dst_addr in an IP packet using PF (Packet Filter)?
An IP packet goes out from the server (freebsd) with a specific destination address. You need to change this address when you exit. That is: a ping is sent to the address 192.168.4.217, and at the output it would go to 192.168.1.1.
As far as I remember, the rdr rule only works on incoming packets, and nat changes src_addr.
Interested in the substitution rule in Packet Filter or some other tool (firewall or program) on freebsd.
Thank you)
Answer the question
In order to leave comments, you need to log in
The redirect can also work internally, for example, you can redirect all traffic going outside to port 80 to the internal host:
rdr on $internal_if proto tcp from $lannet to any port 80 -> $internal_host port 80
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question