I'm having issues with Static routes not getting added to my servers Kernel Routes for my vpn clients.
So that I can use an internal IP to connect to that server.
I have narrowed down my issue to the route is actually missing on the server for the lans on my vpn client.
All of my clients can connect and communicate with each other.
but my server can only connect to the actual clients not any of their lans.
Code:
C:\Users\BlindRain>tracert 192.168.255.3
Tracing route to 192.168.255.3 over a maximum of 30 hops
1 2 ms <1 ms <1 ms 192.168.200.1
2 729 ms 742 ms 703 ms 10.8.0.253
3 788 ms 1010 ms 730 ms 192.168.255.3
Trace complete.
C:\Users\BlindRain>tracert 192.168.253.83
Tracing route to 192.168.253.83 over a maximum of 30 hops
1 14 ms 8 ms 12 ms 192.168.200.1
2 177 ms 143 ms 258 ms 192.168.253.83
Trace complete.
C:\Users\BlindRain>
So you can see my traffic is traveling over the vpn.
VPN Servers Kernel Routing table.
Code:
[root@vps ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.255.255.1 * 255.255.255.255 UH 0 0 0 eth0
172.18.18.0 * 255.255.255.0 U 0 0 0 eth1
10.8.0.0 * 255.255.255.0 U 0 0 0 tun2
10.25.0.0 * 255.255.255.0 U 0 0 0 tun0
10.7.0.0 * 255.255.255.0 U 0 0 0 tun1
10.4.100.0 10.255.255.1 255.255.254.0 UG 0 0 0 eth0
10.4.98.0 10.255.255.1 255.255.254.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
link-local * 255.255.0.0 U 1003 0 0 eth1
default 10.255.255.1 0.0.0.0 UG 0 0 0 eth0
Code:
[root@vps ~]# cat /etc/sysconfig/network-scripts/route-tun2
192.168.0.0/16 via 10.8.0.2 dev tun2
172.16.0.0/12 via 10.8.0.2 dev tun2
10.0.0.0/8 via 10.8.0.2 dev tun2
this file works only when vpn server is already running and I restart my network service.
Code:
[root@vps ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
[ OK ]
Bringing up interface eth1: Determining if ip address 172.18.18.1 is already in use for device eth1...
[ OK ]
[root@vps ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.255.255.1 * 255.255.255.255 UH 0 0 0 eth0
172.18.18.0 * 255.255.255.0 U 0 0 0 eth1
10.8.0.0 * 255.255.255.0 U 0 0 0 tun2
10.25.0.0 * 255.255.255.0 U 0 0 0 tun0
10.7.0.0 * 255.255.255.0 U 0 0 0 tun1
10.4.100.0 10.255.255.1 255.255.254.0 UG 0 0 0 eth0
10.4.98.0 10.255.255.1 255.255.254.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
link-local * 255.255.0.0 U 1003 0 0 eth1
192.168.0.0 10.8.0.2 255.255.0.0 UG 0 0 0 tun2
172.16.0.0 10.8.0.2 255.240.0.0 UG 0 0 0 tun2
10.0.0.0 10.8.0.2 255.0.0.0 UG 0 0 0 tun2
default 10.255.255.1 0.0.0.0 UG 0 0 0 eth0
[root@vps ~]#
how do I resolve this.
I have this in my config file
Code:
route 192.168.0.0 255.255.0.0
route 172.16.0.0 255.240.0.0
route 10.0.0.0 255.0.0.0