View Full Version : OpenVPN blocking outgoing internet
itconsultant
01-09-2008, 10:59 AM
I have my untangle box in router mode with pretty much all the open source packages installed. OpenVPN works fine for accessing my internal network 192.168.0.x as it is exported to the VPN 172.16.16.x. I've been trying to also route internet traffic through the Untangle box when using OpenVPN with no success. I'm sure that I'm missing something somewhere. The only change that I have made to try to get this to work is adding the line "redirect-gateway def1" to the client config.
When trying to pass traffic and watching the Untangle console, the firewall module passes traffic and the OpenVPN one blocks it. I have also added a pass rule to the firewall as was suggested in one of the other threads even though it is set to pass by default.
Any help on this would be much appreciated.
I know that this has been talked about before just not quite sure where. The problem is that this really isn't what the vpn module was designed to do...
I assume that you got the redirect gateway command from here-
http://openvpn.net/howto.html#redirect
Now the issue comes from what to do on the Untangle server.....
It says that all you would have to do would be to add something like this to the iptables config:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
That would cause the traffic to be nat'd and sent out the external interface.....
Not sure.... probably worth looking into though... very interesting.
itconsultant
01-10-2008, 08:22 AM
Thanks for the link. I may go ahead and try that. Redirect-gateway was just something I found in the general openvpn setup instructions.
I had posted something a while ago about a non-split tunnel configuration that was dead simple in Endian and worked perfectly. After my hard drive died in my Endian setup I decided it was time for a change and installed Untangle. So far it has been working well except for this one thing.
I like the Untangle reports and the ad filtering from the spyware blocker. Endian had that capability too but whiting out of the ads vs. displaying an error message in their place is nice.
dmorris
01-10-2008, 11:59 AM
don't run iptables command manually, that won't help.
Which machines lose internet connectivity? The machines behind untangle?
It works when no one is connected to the VPN, but when someone connects they lose connectivity?
itconsultant
01-14-2008, 05:25 PM
The machine that is connecting to the VPN loses internet connectivity when I add the redirect-gateway line to the client config for OpenVPN and then run it with that profile instead of the autogenerated one. I am trying to reroute all traffic, even internet traffic, for the remote user. That command was what I used when I was using Endian Firewall with OpenVPN prior to replacing it with Untangle. The connection into my internal network still works and I can access the internal network properly, it is just not routing the internet traffic for the remote user. And because I have changed the gateway the remote user's internet traffic no longer flows directly out of the previous gateway.
The remote, vpn user, is the only one affected by my openvpn client config change.