IPRoute2: Difference between revisions
From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) mNo edit summary |
||
Line 5: | Line 5: | ||
ip rule add from 192.168.4.0/24 table ovpn | ip rule add from 192.168.4.0/24 table ovpn | ||
# Allow direct access to the other end of the tunnel | |||
ip route add 10.8.0.0/27 via 10.8.0.5 dev tun0 table ovpn | ip route add 10.8.0.0/27 via 10.8.0.5 dev tun0 table ovpn | ||
# Route packets for the Ubiquiti radio direct to the WAN port | |||
ip route add 192.168.1.20 via 192.168.1.1 dev eth1 table ovpn | |||
# When packets are destined for the CDS network, send then to the tunnel | # When packets are destined for the CDS network, send then to the tunnel |
Latest revision as of 00:10, 26 December 2014
#Create an alias to call our table echo 10 ovpn >> /etc/iproute2/rt_tables # When packets come in from the LAN, send them to the custom table ip rule add from 192.168.4.0/24 table ovpn # Allow direct access to the other end of the tunnel ip route add 10.8.0.0/27 via 10.8.0.5 dev tun0 table ovpn
# Route packets for the Ubiquiti radio direct to the WAN port ip route add 192.168.1.20 via 192.168.1.1 dev eth1 table ovpn # When packets are destined for the CDS network, send then to the tunnel ip route add 192.168.2.0/24 via 10.8.0.5 dev tun0 table ovpn # When they are destined for the LAN, send them to it. ip route add 192.168.4.0/24 via 192.168.4.254 dev br-lan table ovpn # Everything else goes to the Internet router ip route add default via 192.168.1.1 dev eth1 table ovpn ip route show table ovpn ip route flush cache