Good evening,I am a former IPCOP, then IPFIRE, then now OPNsense 20.7.4-amd64I configured Opnsense ... a pleasure .... everything works perfectly.Problem:I have configured an OPENVPN server with clients .... it's ok everything is working perfectly.My remote users can access my servers (SAMBA) and they can access the internet via Opnsense.What I'm trying to configure is that my users access the servers via OPENVPN ... but that their internet browsing is done through their ISPs and not from Opnsense while keeping their VPN connections open.I therefore deactivate / activate Redirect Gateway on the Openvpn server .... but their gateway is still that of Opensense.Is there a special config to do what I want?Thanks in advance.PS:Sorry for my english .... i am french.
I deactivated Redirect Gateway and restarted the server, re export a client and install it on his workstation. His public internet ip is that of Opnsense and not his.IPv4 Tunnel Network: 192.168.240.0/24LAN: 192.168.250.0/24
By activating / deactivating Redirect Gateway, the (remote) user pc always goes through opnsense… to surf the internet.I must not have fully understood the Redirect Gateway feature.On Opnsense:WAN (public ip): 82.X.Y.ZLAN: 192.168.250.0/24 (SAMBA server: 192.168.250.10)OPENVPN: 192.168.240.0/24 (gateway: 192.168.240.1)User PC (Windows 10) before VPN connection:WAN (public IP): 92.Z.Z.ZLAN: 192.168.43.0/24 (gateway: 192.168.43.1)Local IP: 192.168.43.10The pc is browsing the internet with 92.Z.Z.Z as the IPIf Redirect Gateway is checked and IPv4 Local Network is empty: all traffic goes through opnsense.After connecting to the VPN the user pc becomes:WAN (public IP): 82.X.Y.ZLAN: 192.168.240.0/24 (gateway: 192.168.240.1)Local IP: 192.168.240.5The pc browses the internet with the IP 82.X.Y.Z and uses the bandwidth of Opnsense.If Redirect Gateway is not checked and IPv4 Local Network 192.168.250.0/24: only 192.168.250.0/24 goes through opnsense.After connecting to the VPN the user pc becomes:WAN (public IP): 92.Z.Z.ZLAN: 192.168.43.0/24 (gateway: 192.168.43.1)Local IP: 192.168.43.10A route 192.168.250.0/24 is added to be able to reach the SAMBA server 192.168.250.10The pc browses the internet with 92.Z.Z.Z as the IP but does not use the Opnsense bandwidth (except for SAMBA 192.168.250.10).Where is the error?
Oops ... noOpenvpn server with Redirect Gateway ticked works fine.But that's not what I want to do.I want to uncheck Redirect Gateway so that user PCs use their bandwidth to surf the internet and use opnsense bandwidth only to go to the SAMBA server.If I uncheck Redirect Gateway… Internet surfing always goes through Opnsense.
Hi, I made an example to make sure I understood how Redirect Gateway works.If I follow the example, currently if I uncheck Redirect Gateway (with restart of the server, and export of the client), I have the current config:WAN (public IP): 82.X.Y.ZLAN: 192.168.240.0/24 (gateway: 192.168.240.1)Local IP: 192.168.240.5which is not good, because the pc is browsing the internet with IP 82.X.Y.Z as the IP and using the Opnsense bandwidth.What I'm looking to do is:WAN (public IP): 92.Z.Z.ZLAN: 192.168.43.0/24 (gateway: 192.168.43.1)Local IP: 192.168.43.10A route 192.168.250.0/24 is added to be able to reach the SAMBA server 192.168.250.10The pc browses the internet with 92.Z.Z.Z as the IP but does not use the Opnsense bandwidth (except for SAMBA 192.168.250.10).Whether I check or uncheck Redirect Gateway, the user pc config is not what I am looking for.I have the impression that Redirect Gateway unchecked is not supported ...
Update OPNsense 20.7.4-amd64 to OPNsense 20.7.5-amd64The Redirect Gateway option checked, unchecked now works normally.Recap:Redirect Gateway not checkedMy pc users have Opnsense bandwidth for SAMBA, and their own bandwidth for surfing the internet.Windows 10 PC with openvpn community 2.4.7… OKLinux PC Debian 10 (GNOME) with openvpn 2.4.7-1 ... .. you must check "only use this connection for resources on this network" in the IPV4 menu ... OKInfo:On windows, if an OPENVPN server has the Redirect Gateway option checked and you want to force the use of the internet with the bandwidth of the PC and use the bandwidth on the OPENVPN server for resources…. add "pull-filter ignore redirect-gateway" in the client's xxxx.opvn file.Sorry for my English ... I am French.Thanks for your help.