# Access to local lan via VPN



## marcinpruciak (Aug 14, 2016)

I have VPN server in my home, and wanna connect my FreeBSD VPS by OpenVPN for mount disk by NFS.
I have correctly VPN configuration, but i have problem with routing for access to lan but without change my default gateway. 
When i put in server configuration:

```
redirect-gateway def1
```
I lost connection to VPS, by my public IP.

What i should put in my firewall?


----------



## ondra_knezour (Aug 14, 2016)

You may be looking for OpenVPN directive push route.


----------



## marcinpruciak (Aug 14, 2016)

Yes, i know it.
I'm actually asking, what routing i should use? I am beginner in route.


----------



## ondra_knezour (Aug 14, 2016)

If I understand your scenario correctly, you have OpenVPN server at home and some VPS connecting to this server. So you have to tell this client, which network/addresses are available behind this connection. If you use at home something like 192.168.0.0/24 network, push route 192.168.0.0 255.255.255.0 should be sufficient.

See also https://openvpn.net/index.php/open-source/documentation/howto.html#scope


----------

