I was trying to capture localhost traffic with Ethereal, which doesn't work without re-routing localhost traffic to your router gateway. I didn't get the route command quite right, and messed up my routing table. I typed route -f to clear the routing table and rebooted, but when I finished rebooting, the routing table wasn't restored to its original state.
This is very much a learning question if someone would be happy to explain a couple of concepts.
I'm using iproute2 to set up policy routing as follows:
echo 200 $table >> /etc/iproute2/rt_tables
ip rule add from $my_ip table $table
ip route add default via $gw_ip dev $dev table $table
ip route flush cache
Where $dev is a device set-up by OpenVPN. This way everything bound to $my_ip, would go through $gw_ip.
In using CentOS I have some problem in place the route in correct place my routing table entries are like this:
10.9.*.0/24 dev eth0.102
10.*.*.0/24 dev eth0.101
I added one rule for a single host which is in the network 10../0/24 but when I need the route it is placed below the route for 10...0/24 network.
10.9.*.0/24 dev eth0.102
10.*.*.0/24 dev eth0.101
10.*.*.2/32 dev eth0.103
But the ne
Ranmaru wrote:I think the problem is that NetworkManager generally prefers ethernet over WiFi and thus tries to route all traffic through eth0 as soon as you connect the cable.I guess you could fix it by using your routing table to prefer the wireless connection over ethernet, but then you would have the problem the other way around.
The BSD route command has a feature that will show what route will be selected for a given host.
In my AWS Route 53 control panel I simply have 2 A records currently set up for the 'www' and the 'non www' names. Both point to the Elastic IP address associated with my EC2 Instance. This works well and my simple static website is available at both variations but I really want all 'www' to route to the 'non www'.
What is the reccomened method for routing all traffic that comes to...
Is there a way to obtain flags of the routing table through any API?
Netlink socket doesn't show any place for flags.
After checking route command's source code in net-tools it seems that it reads route from proc filesystem, i am wary of doing this, as it seems to be OS flavor dependent.
In my network configuration, I have three switches:
Internet (xx.xx.140.129/25)
Internal SAN (10.1.1.0/24)
iLo management (10.1.30.0/24)
I have one Linux server which I use for management that needs to have access to all three networks, however it only has 2 NICs.