Openvpn to lan NAT
-
Hi,
i am trying to reach a server from the openvpnserver (which is not pfsense) through pfsense to a local LAN.
The tunnel is up and running so that works.
but the port forwarding from the opt1 (openvpntunnel) to the lan is not using the right interface.config:
pfsense NIC opt1 has ip 10.8.0.18 (he gets this from the vpntunnel)
i have a lan connection with ip: 10.40.200.12now i am trying to reach a server with ip 10.40.200.1 this way:
from openvpn server 10.8.0.1 I telnet to 10.8.0.18–> pfsense portforward from 10.8.0.18 to --> 10.40.200.1
when i run wireshark on 10.40.200.1 I see packets from 10.8.0.1 to 10.40.200.1
is there a way that the source comes from 10.40.200.12 instead of 10.8.0.1 ?
my nat settings:
interface: opt1
protocol: tcp/udp
Destination: OPT1 address
destination port range: 389
redirect target ip: 10.40.200.1
redirect target port: ldap
nat reflection: use system default
filter rule association: rule nat -
found the solution.
I set the NAT outbound mode from automatic to manual.
created a new rule on the WAN interface where the source 10.8.0.0 gets translated to destination 10.40.200.1.