Accessing clients connected through openVPN
-
Hello all,
Im using openVPN server on my pfsense box and devices can connect to this server using this openvpn server. Also devices connected via openvpn can access my lan network. But what I would like to to accessing devices connected via openvpn from my lan network.
Pfsense ip: 192.168.1.1
Openvpn network: 192.168.40.1 /24
My lan network: 192.168.1.1 /24How should I configure my outbout NAT or anything else to access openvpn clients. By the way, on pfsense web interface, I can ping open vpn clients IP which is 192.168.40.2 from pfsense. But I cant do it from my devices on lan which's ip is 192.168.1.99.
Thanks in advance
-
@umtsti
Simplest way is to NAT traffic to the OpenVPN server IP with an outbound NAT rule.Switch the outbound NAT into hybrid mode and save this.
Then add a rule:
interface: OpenVPN
source: LAN net
destination: Network > 192.168.40.0/24
translation: interface address -
@viragomann Hello, thank you for your answer. but it didnt work maybe Im doing something wrong. Can you inspect my config below ?
Here you can see my clients, they have 192.168.30.2 amd 192.168.30.3
İn nat config, I already switched to hybrid mode. Is this correnct ?
-
@umtsti
The translation address has to be "interface address". WAN might not be correct here.
Interface address means the one of the OpenVPN server, since you have defined this rule on the OpenVPN interface (group). -
@viragomann
Hello, but there is no option for open vpn -
@umtsti
Indeed, this option was removed.So you have to options.
Either state the server address manually by selecting "Network or Alias" from the drop-down. Then enter the server address 192.168.40.1 with a /32 mask.
The second option is to assign an interface to the OpenVPN instance. Then you should get the interface address.
I would take the first one. -
@viragomann Its now works, thank you so much for you help.