I have two houses with separate internet connection in different locations. Both have no public ip address due to DSL lite.
I would like to connect devices in one network (home automation for example) from the other and vice versa.
To achieve this, I rented a server with debian 9 and public ip address.
Could anyone hint me to a how to page, guide or something else to set it up?
PS: I don't want the complete traffic to be routed through the VPN. Just want to connect devices from my other lan.
Connect two LAN via OpenVPN on vServer
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 5
- Joined: Fri Aug 26, 2016 5:40 pm
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Connect two LAN via OpenVPN on vServer
In three years you have not read the howto ?
-
- OpenVpn Newbie
- Posts: 5
- Joined: Fri Aug 26, 2016 5:40 pm
Re: Connect two LAN via OpenVPN on vServer
Many, but did not get it working properly.
-
- OpenVpn Newbie
- Posts: 5
- Joined: Fri Aug 26, 2016 5:40 pm
Re: Connect two LAN via OpenVPN on vServer
At least I got the VPN Working, but not yet routing between sub nets.
There is a ubuntu server in the public interbet, running theOpenVPN-Server. adress is 10.8.0.1
both of my houses LANs connect to the openvpnServer. I can see the tunnel interface.
Server
-----------------------------
vpn network is 10.8.0.0/24
adress is 10.8.0.1
House 1
------------------------------
subnet 10.100.11.0/24
vpn address 10.8.0.4
House 2
------------------------------
subnet 10.100.12.0/24
vpn address 10.8.0.2
when pinging 10.100.11.1 from 10.100.12.1 I can see the request on the VPN Server, but it does not get forwarded to 10.8.0.4 or 10.100.11.1
A TCPDUMP on house 1 does not even show the icmp request.
On the Server I can at least see, that it is forwarded
21:37:53.568523 IP 10.8.0.2 > 10.100.11.1: ICMP echo request, id 6289, seq 1402, length 64
21:37:53.568553 IP 46.232.xxx.149 > 10.100.11.1: ICMP echo request, id 6289, seq 1402, length 64
21:37:54.568166 IP 10.8.0.2 > 10.100.11.1: ICMP echo request, id 6289, seq 1403, length 64
21:37:54.568196 IP 46.232.xxx.149 > 10.100.11.1: ICMP echo request, id 6289, seq 1403, length 64
this is the route list on the server
root@server:~# ip route list
default via 46.232.xxx.1 dev ens3 proto dhcp src 46.232.xxx.149 metric 100
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1
10.100.11.0/24 via 10.8.0.4 dev tun0
10.100.12.0/24 via 10.8.0.2 dev tun0
46.232.xxx.0/22 dev ens3 proto kernel scope link src 46.232.xxx.149
46.232.xxx.1 dev ens3 proto dhcp scope link src 46.232.xxx.149 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
Could anyone please assist me in setting the routing correctly?
There is a ubuntu server in the public interbet, running theOpenVPN-Server. adress is 10.8.0.1
both of my houses LANs connect to the openvpnServer. I can see the tunnel interface.
Server
-----------------------------
vpn network is 10.8.0.0/24
adress is 10.8.0.1
House 1
------------------------------
subnet 10.100.11.0/24
vpn address 10.8.0.4
House 2
------------------------------
subnet 10.100.12.0/24
vpn address 10.8.0.2
when pinging 10.100.11.1 from 10.100.12.1 I can see the request on the VPN Server, but it does not get forwarded to 10.8.0.4 or 10.100.11.1
A TCPDUMP on house 1 does not even show the icmp request.
On the Server I can at least see, that it is forwarded
21:37:53.568523 IP 10.8.0.2 > 10.100.11.1: ICMP echo request, id 6289, seq 1402, length 64
21:37:53.568553 IP 46.232.xxx.149 > 10.100.11.1: ICMP echo request, id 6289, seq 1402, length 64
21:37:54.568166 IP 10.8.0.2 > 10.100.11.1: ICMP echo request, id 6289, seq 1403, length 64
21:37:54.568196 IP 46.232.xxx.149 > 10.100.11.1: ICMP echo request, id 6289, seq 1403, length 64
this is the route list on the server
root@server:~# ip route list
default via 46.232.xxx.1 dev ens3 proto dhcp src 46.232.xxx.149 metric 100
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1
10.100.11.0/24 via 10.8.0.4 dev tun0
10.100.12.0/24 via 10.8.0.2 dev tun0
46.232.xxx.0/22 dev ens3 proto kernel scope link src 46.232.xxx.149
46.232.xxx.1 dev ens3 proto dhcp scope link src 46.232.xxx.149 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
Could anyone please assist me in setting the routing correctly?