# Openvpn: not able to ping through the vpn

## jj74

Hi, I'm non able to ping from client XP (192.168.0.124) to a machine in the private network (192.168.1.119) 

through th vpn-net (10.1.0.1)

192.168.0.124 # ping 10.1.0.1 			OK

192.168.0.124 # ping 192.168.0.120 		OK

192.168.0.124 # ping 192.168.1.119 		NO !!!

192.168.1.120 # ping 192.168.1.119 		OK

192.168.1.119 # ping 192.168.0.124 		OK

192.168.1.119 # ping 10.1.0.6 			OK

I've noted a route on server with gw 10.1.0.2, but i dont know who is  :Sad: 

Thanks  

----------

## MrUlterior

Your openvpn servers' local.conf file sets:

```
server 10.1.0.0 255.255.255.0 
```

If you read the docs, this has the following implications:

 *Quote:*   

> --server network netmask
> 
>     A helper directive designed to simplify the configuration of OpenVPN's server mode. This directive will set up an OpenVPN server which will allocate addresses to clients out of the given network/netmask. The server itself will take the ".1" address of the given network for use as the server-side endpoint of the local TUN/TAP interface.

 

Which implies that your client will be allocated the address 10.1.0.2, your server being 10.1.0.1.

Now, if your LAN is on eth0 and your VPN on tun0 or tap0 -- both will need to have DIFFERENT networks and a route pointing each network to each interface. If you wish to use your VPN to join client to your LAN, you will need to bridge the interfaces.

In either case, I suggest you read the docs & simplify your network and get it working step-by-step first. The various snippets you posted look ... like a mess  :Smile: 

Good luck.

----------

## jj74

Tanks for your reply, I Know to be a bit confused.

I've read documentation about "server", and you are right, but why my client get the 10.0.0.6 and not the 10.0.0.2

and who set the dhcp server of the tun on the cliento to 10.0.0.5?

It coud be some set of test I've done before are still active also if I've reboot?

Thanks

----------

## MrUlterior

 *jj74 wrote:*   

> Tanks for your reply, I Know to be a bit confused.
> 
> It coud be some set of test I've done before are still active also if I've reboot?
> 
> 

 

It could be, I don't know whether routing tables are persistent or not, I'd suggest you delete all the routes and recreate them one by one testing each before you continue with the next.

----------

