OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: derethor on April 27, 2020, 01:57:52 pm

Title: How to SNAT LAN->VPN
Post by: derethor on April 27, 2020, 01:57:52 pm
Hello!

I am trying to let hosts from the LAN to access hosts on the VPN.

this is an office with a lan, and the opnserver as gateway, connected to the cable router. Remote clients can connect to the opnserver, and that is working well.

So, this is the conf

LAN 10.32.64.0/24  -> OPENVPN SERVER (10.192.32.1) -> REMOTE (10.192.32.6)

Now, I want to snat packages from the lan, to the remote clients. For example, to a remote webserver on the vpn.

I tried with the nat outbound. I enabled the hybrid rule generation, and created a rule to snat traffic from lan to the vpn server ip. But it is not working, and I cannot see anything on the log.

has anyone tried this before?

Title: Re: How to SNAT LAN->VPN
Post by: derethor on April 27, 2020, 05:42:39 pm
i found the solution!

I didnt create an alias for the lan network and the vpn network. It seems that the NAT outbound does not detect the lan/vpn network range or something like that..

With alias, it works perfectly :)