Hi,
i need to redirect all traffic from a private ip address attested on a local interface, to a public ip address.
The old configuration with iptables it's something like this
I've tried something with rdr in pf configuration but it won't work
Someone can help me?
i need to redirect all traffic from a private ip address attested on a local interface, to a public ip address.
The old configuration with iptables it's something like this
Code:
iptables:-A PREROUTING -d $private_ip/32 -i $int_if -j DNAT --to-destination $public_ip
iptables:-A PREROUTING ! -d $private_ip/30 -i $int_if -p tcp -m tcp --dport 80 -j NOTRACK
I've tried something with rdr in pf configuration but it won't work
Code:
rdr pass log proto {tcp udp} from any to any port 1:10000 -> $public_ip
pass out quick log proto {tcp udp} from any to $public_ip flags S/SA keep state
Someone can help me?