How to redirect public traffic to openvpn connected client
I have pfsense router in datacenter and some static IPs available.
I have FreeBSD host somwhere in the Internet, behind a NAT, that establishes connection via openvpn to my PFSense router.
If I establish another VPN connection I can reach that FreeBSD host over vpn tunnel via 10.0.6.250 IP (static assignment).
I'd like to start web server on the FreeBSD host (running OpenVPN client) and have this web server visible via the IP of the pf sense router from the Internet side. I thought I could achieve that by NAT port forward on pfsense, forwarding port eg. 80 to the vpn client IP address 10.0.6.250, but it doesn't work and I don't know how to fix that.
Could you point me to the right direction?
I will appreciate any help in configuring that.
In addition to the port forwarding you will need an outbound NAT rule for the OpenVPN interface.
In Firewall: NAT: Outbound try to add a rule like this:
Interface=OpenVPN, Source=any, Destination=any (or your vpn clients IP), Translation=Interface address
It worked, after I restarted the pfsense box.
Thank you :-)