Yes, Turris is gateway (all the machines behind it have Internet access). All the same with a Debian gateway (OpenVPN server). First of all - this is route command for Turris:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default static-real_IP 0.0.0.0 UG 0 0 0 eth1
real_IP * 255.255.255.252 U 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.2.1 192.168.2.5 255.255.255.255 UGH 0 0 0 tun0
192.168.2.5 * 255.255.255.255 UH 0 0 0 tun0
192.168.10.0 192.168.2.5 255.255.255.0 UG 0 0 0 tun0
and its network interface tun:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.2.6 P-t-P:192.168.2.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:33 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2124 (2.0 KiB) TX bytes:1316 (1.2 KiB)
So I tried to add route (as you adviced) - result is bad:
root@turris:/etc/openvpn# ip route add 192.168.10.0/24 via 192.168.2.1
RTNETLINK answers: Network unreachable
Here is a ping from Turris to network behind Debian, itâs OK:
root@turris:/etc/openvpn# ping 192.168.10.5
PING 192.168.10.5 (192.168.10.5): 56 data bytes
64 bytes from 192.168.10.5: seq=0 ttl=127 time=4.321 ms
64 bytes from 192.168.10.5: seq=1 ttl=127 time=3.863 ms
64 bytes from 192.168.10.5: seq=2 ttl=127 time=8.588 ms
Now please look at Debian side (VPN server):
route:
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default real_gateway_IP 0.0.0.0 UG 0 0 0 ens192
localnet 0.0.0.0 255.255.255.224 U 0 0 0 ens192
192.168.1.0 192.168.2.2 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 192.168.2.2 255.255.255.0 UG 0 0 0 tun0
192.168.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 ens224
network interface of VPN server:
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 192.168.2.1 netmask 255.255.255.255 destination 192.168.2.2
inet6 fe80::6a8:621b:55fd:a4d0 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 20 bytes 1820 (1.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 46 bytes 2928 (2.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
And all the same - trying to add route:
root@openvpn:/home/garett# ip route add 192.168.1.0/24 via 192.168.2.6
RTNETLINK answers: Network is unreachable
But there is some different - ping from Debian to network 192.168.1.0/24 (behind Turris) is unavailable:
ping 192.168.1.5
PING 192.168.1.5 (192.168.1.5) 56(84) bytes of data.
From 192.168.2.6 icmp_seq=1 Destination Port Unreachable
From 192.168.2.6 icmp_seq=2 Destination Port Unreachable
From 192.168.2.6 icmp_seq=3 Destination Port Unreachable
Please help
Have no idea what is wrong with configurationâŚ