PF pf Redirect from IPv4 to IPv6

Farhan Khan

Active Member

Reaction score: 8
Messages: 111

Hi all,

I am trying to forward traffic from my IPv4 address on port 8000 to a jail's IPv6 address on the same port. Is that possible? My line in /etc/pf.conf is:

Code:
rdr on vtnet0 proto tcp from any to [IPv4 Address] port 8000 -> [IPv6 Address] port 8000
This comes back with an unspecified syntax error.

Thanks,
 

Remington

Aspiring Daemon

Reaction score: 157
Messages: 519

You can use IPv6 tunnel broker to get IPv6 addresses for your devices if your router supports it.
 

Chris_H

Daemon

Reaction score: 193
Messages: 1,076

Short and simple answer, no.
OK I know this is a bit late in the game. But I think if the OP's IPv4 address was a single (static) IP, and easier if the only IP in the NIC. Then it would be totally doable.
Something along the lines of:
rc.conf(5):
Code:
pf_enable="YES"
pflog_enable="YES"

cloned_interfaces="lo1"
pf.conf(5)
Code:
ext_nic="<host-nic-IP-address>"

set skip on {lo0}

nat pass on <host-NIC-driver-name> from lo1 to any -> $ext_nic
rdr pass on <host-NIC-driver-name> proto tcp from any to lo1 -> $ext_nic

...
Additional adjustments would be needed (add ipv6) above.
But assuming that the jail has/gets an IPv6 address assignment, even if only by/through resolv.conf(5).

I'm pretty sure something like this could work.

--Chris
 
Top