1
18.7 Legacy Series / Re: static route on WAN Interface with default route not working
« on: December 11, 2018, 08:18:58 pm »
Example with 10.0.0.0/8 to null interface.
OK. Only Route to Null Interface and its blocked, connected interfaces ok:
Not OK. Route to Null interface and more specific route:
OK. Only Route to Null Interface and its blocked, connected interfaces ok:
Code: [Select]
netstat -r
Internet:
Destination Gateway Flags Netif Expire
default 192.168.0.254 UGS vtnet0
10.0.0.0/8 localhost UGSB lo0
10.10.10.0/24 link#4 U vtnet3
traceroute 10.10.10.20 --> ok, direct connected
traceroute to 10.10.10.20 (10.10.10.20), 64 hops max, 40 byte packets
1 10.10.10.20 (10.10.10.20) 0.404 ms 0.267 ms 0.200 ms
traceroute 10.9.8.9 --> ok, not direct connected, only default route
traceroute: findsaddr: failed to connect to peer for src addr selection.
Not OK. Route to Null interface and more specific route:
Code: [Select]
netstat -r
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 192.168.0.254 UGS vtnet0
10.0.0.0/8 localhost UGSB lo0
10.9.8.0/24 192.168.0.101 UGS vtnet0
10.10.10.0/24 link#4 U vtnet3
OPNsense link#4 UHS lo0
traceroute 10.9.8.9 --> wrong next hop
traceroute to 10.9.8.9 (10.9.8.9), 64 hops max, 40 byte packets
1 192.168.0.254 (192.168.0.254) 0.631 ms 0.525 ms 0.546 ms
2 10.136.55.229 (10.136.55.229) 16.491 ms 18.481 ms 10.514 ms
3 172.16.20.110 (172.16.20.110) 11.915 ms 11.994 ms 11.989 ms
4 172.16.20.109 (172.16.20.109) 11.808 ms 11.396 ms 11.711 ms
traceroute 10.8.8.9 --> ok, not direct connected, only default route
traceroute: findsaddr: failed to connect to peer for src addr selection.
traceroute 10.10.10.20 --> ok, direct connected
traceroute to 10.10.10.20 (10.10.10.20), 64 hops max, 40 byte packets
1 10.10.10.20 (10.10.10.20) 0.425 ms 0.280 ms 0.150 ms