[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] howto change gateway???


  • Subject: Re: [Openvpn-users] howto change gateway???
  • From: John Locke <mail@xxxxxxxxxxxx>
  • Date: Fri, 02 Apr 2004 06:48:15 -0800

Hi, Rene,

On Fri, 2004-04-02 at 02:43, René_Pedersen wrote:
> Hi,
> 
> I have succesfully set up a tunnel between my windoze xp and my linux samba
> server with openvpn.
> 
Good!

> ---
> 
> Now I want to connect to my samba server from my windoze, but as the
> configuration is now I cannot do that.
> 
> I think my problem is that openvpn makes the following route entry on the
> linux box:
> 
> NETWORK	GATEWAY	NETMASK		...	Iface
> 10.3.0.1	0.0.0.0	255.255.255.0		tap0
> 
> where my default gateway i 192.168.2.1
> 
> The solution in my view is to change the GATEWAY in the "OpenVPN route
> entry" to 192.168.2.37
> 
No, that's not correct. If you change the gateway for this network, your
traffic will go outside the tunnel to your default gateway, and get
dropped.

Because your Samba server is at the other end of the tunnel, you should
be able to connect just fine through the tunnel, using the 10.3.0.1
address.

The problem is most likely that Samba isn't listening on that address.
Check your Samba configuration to make sure it's listening on all
interfaces, and then restart Samba--if Samba is started before the Tap
device is up, it won't ever listen to traffic coming through the tunnel.

> How do I do that????
> 
> Is there a better solution????

If all you're trying to connect is these two boxes, your configuration
should be fine.

However, if you want to connect to other machines on the LAN beyond
either VPN gateway, you're going to have routing trouble because both
networks use the same subnet. Depending on how you're set up, you might
be able to subnet the 192.168.1.* network further (for example, the
Linux box is at .37, and your Windows box is at .75. You could create
your office subnet to only have computers between 192.168.1.33 and
192.168.1.62, while the other side has computers between 192.168.1.65
and 192.168.1.94, and use a subnet masks for both of 255.255.255.224),
but much easier would be to move one of the networks to an entirely
different address range (say 192.168.17.x).

Cheers,
-- 
John Locke
Open Source solutions for small business problems
http://freelock.com


____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users