[Openswan Users] wrong gateway ip assigned

Paul Wouters paul at xelerance.com
Tue May 10 12:36:00 CEST 2005


On Tue, 10 May 2005, Paul Wouters wrote:

> I notice this on l2tp connections with both Windows and MacOSX (Linux
> as l2tp client untested), even though /etc/ppp/l2tpd.options has the
> option "nodefaultroute". So if the VPN is up, everything has to go through
> the VPN. MacOSX has no option to disable this.
>
> Windows has an option to disable this: Click on the VPN connection, go to 
> properties, then Networking, then
> TCP properties, then Advanced, and then unselect "Use default gateway on
> remote network".

MacOSX (Tiger) has this option in Internet Connect now. Select the VPN, then
in the Connect menu open the Options menu and unselect "Send all traffic over
VPN connection".

For MacOSX (Panter) this option does not exist. Work around solutions are to
manually add/delete the default route, or to write a pppd wrapper. This one
came from www.macosxhints.com:

Start by creatings a new pppd file:

  % su
  % cd /usr/sbin/
  % mv pppd pppd.orig
  % vi pppd

Put in the following text:

  #!/usr/bin/perl
  my @args = @ARGV;
  s/^defaultroute/nodefaultroute/ for @args;
  exec "/usr/sbin/pppd.orig", @args;

Thanks to Alex Le Heux for these pointers!

Paul


More information about the Users mailing list