If you are using manual settings, different versions of OS X behave differently. This is due to a change in network behavior in Snow Leopard and is beyond the scope of this project to fix.
- If you're using Leopard (10.5) or Tiger (10.4), then it is possible to use the VPN-server-supplied DNS and WINS settings in addition to your manual settings by selecting "Set nameserver". However, your manual settings will always take precedence over any VPN server-supplied settings. If "Do not set nameserver" is selected, you will continue to use only your manually-configured settings and any VPN server-supplied settings will be ignored. "Take precedence" means that the manual DNS server will be used for all DNS queries unless it fails to answer, in which case the VPN server-supplied DNS server will be used.
- f you are using Snow Leopard (10.6), then your usual DNS and WINS settings will always be used, and no aggregation of configurations will be performed.
--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To post to this group, send email to tunnelbli...@googlegroups.com.
To unsubscribe from this group, send email to tunnelblick-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en.
Thanks, Nick -- every email you send helps me understand more. (Or maybe I just think I'm understanding more :-)
I had been looking at it in terms of "-redirect-gateway", but as I now understand it, if DHCP supplies a default gateway right now, we in effect ignore it. What we should do is route all traffic through it -- it should override both the existing default gateway and the VPN gateway (if necessary).
(We don't really ignore the DHCP-supplied default gateway: the script dutifully tells OS X about it. But OS X in effect ignores it, as Nick described.)
Isn't ignoring a DHCP-supplied default gateway a bug?
If so, why can't we work around it in the standard scripts? That is, not make a new, optional script that does the correct thing, but instead, put a workaround into the standard script.
The standard script would change so that if DHCP supplied a gateway, all traffic would go through the DHCP-supplied (VPN) gateway, even though redirect-gateway is NOT specified.
If DHCP did not supply a gateway, the standard script wouldn't do anything differently -- only VPN traffic would go through the VPN gateway, and other traffic would go through the (pre-DHCP) default gateway.
--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tunnelblick-discuss/-/Kh70pv3cfeUJ.
--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tunnelblick-discuss/-/HVvubiyjbXsJ.
For the checkbox text, I would go with "Send all traffic over VPN if DHCP pushes default gateway." It's more exact and very clear in what it does and when it doesn't do anything (checking it has no effect if DHCP doesn't push a default gateway). It's also worded nearly identical to how the OS words the setting for "supported" VPNs.
The only other thing we need to consider is conflicts. What if the user has two or more VPNs configured with that checkbox checked? Obviously it can't work for all of them. What do we do then?
The most elegant way to handle this, IMO, is upon connecting to
a VPN we check to see that if it is set to redirect the gateway *and*
we are already connected to a VPN which does the same then to show a
warning dialogue. In this we can explain that it would result in a
tunnel-over-a-tunnel and if they would like to temporarily disable the
redirect option or continue anyway.
It is perhaps worth highlighting the connecting to two regular (either
plain IP routed tun or non-DHCP tap) VPNs with "--redirect gateway
def1" pushed would result in the same behavior as that described
above.
2011-08-26 19:34:15 /sbin/route add -net 88.191.121.143 192.168.125.1 255.255.255.255
add net 88.191.121.143: gateway <<<my LAN gateway>>>
2011-08-26 19:34:15 /sbin/route delete -net 0.0.0.0 <<<my LAN gateway>>> 0.0.0.0
delete net 0.0.0.0: gateway <<<my LAN gateway>>>
2011-08-26 19:34:15 /sbin/route add -net 0.0.0.0 10.17.0.5 0.0.0.0
add net 0.0.0.0: gateway 10.17.0.5
2011-08-26 19:34:15 WARNING: potential route subnet conflict between local LAN [10.17.0.0/255.255.255.0] and remote VPN [10.17.0.1/255.255.255.255]
2011-08-26 19:34:15 /sbin/route add -net 10.17.0.1 10.17.0.5 255.255.255.255
add net 10.17.0.1: gateway 10.17.0.5
It is perhaps worth highlighting the connecting to two regular (either
plain IP routed tun or non-DHCP tap) VPNs with "--redirect gateway
def1" pushed would result in the same behavior as that described
above.
2011-08-27 06:21:46 /sbin/route add -net 0.0.0.0 10.17.0.169 128.0.0.0
route: writing to routing socket: File exists
add net 0.0.0.0: gateway 10.17.0.169: File exists
2011-08-27 06:21:46 /sbin/route add -net 128.0.0.0 10.17.0.169 128.0.0.0
route: writing to routing socket: File exists
add net 128.0.0.0: gateway 10.17.0.169: File exists
--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
I don't think we should be trying to implement this any particular way other than the way OpenVPN implements it for redirect-gateway. This means A) we can still name the checkbox that and B) we need to say in the help that if you connect to multiple VPNs with that option checked, "all traffic" will only be routed through the first VPN. I just don't foresee this being anything close to a common situation; I'd be surprised if it ever happens.
I'm confused now lol. How do other implementations do redirect-gateway that's different from how redirect-gateway works on Mac OS X?
> Okay, if I understand correctly, DHCP *is* pushing a default gateway, and Correct. This is what occurs on Linux and what is implied by the> OpenVPN/Tunnelblick *is *setting the default gateway in the routes. But you > want this gateway to take *precedence* over the existing default gateway on > your real interface gateway, just like if redirect-gateway had been pushed > by the OpenVPN server? OpenVPN documentation (albeit indirectly): |
I just don't think you're going to see anyone asking for VPN-over-VPN-over-VPN-over... It's just not gonna be a common thing. Remember that this checkbox is only for "if VPN-DHCP pushes default gateway." If they're using DHCP, OpenVPN won't use redirect-gateway, so we don't have to worry about it. If they're not using DHCP, the checkbox is meaningless because of the wording, so again we don't have to worry about it. And if there's ever any confusion, the help item for it will describe exactly when it does and doesn't have an impact on the network configuration.You said yourself that it's fairly common for people to want to route all traffic through the VPN. Shouldn't we try to support that?