# How to pass all traffic but redirect some ports on FreeBSD 10.x



## mrjayviper (Jul 24, 2015)

Here's a simple layout of the setup:

web <=> DD-WRT (OpenVPN client running here) <=> several devices (FreebSD box is one of them but it doesn't use the VPN tunnel. Another device is my MacPro which uses the tunnel)

I have forwarded some ports like SSH to my FreeBSD box. And this works fine.
I've also forwarded some ports (e.g. VNC ports) to my MacPro. But since the MacPro is using the VPN tunnel, I cannot VNC to it. My VNC client just times out.

I was thinking of using the FreeBSD as some sort of "proxy" for VNC. Something like:

web <=> DD-WRT router <=> FreeBSD <=> MacPro

1. I want all incoming traffic from ports xxxx and yyyy to get redirected to my MacPro.
2. All traffic doesn't satisfy no.1, just let it pass as if there's no firewall.

Any ideas on how this can be done? Thanks a lot.


----------



## Day_JJ (Jul 26, 2015)

The easy way would be with IPNAT redirection (rdr) but it appears to be broken with FreeBSD 10.x


----------

