ubuntu setup network routing table

1

I have two interfaces: eth0 and wlan0.

I want all traffic to go though wlan0 except for port 80 traffic that should go on eth0.

Is there a way to setup the routing table so it does that?

My current routing table looks like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.69.1    0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.69.0    *               255.255.255.0   U     0      0        0 eth0

PCoelho

Posted 2013-03-17T04:06:32.413

Reputation: 121

1You can do this with source routing (policy routing), but it is not for the faint of heart. Setting up a transparent proxy on your router would probably be a much easier solution if its an option. – davidgo – 2013-03-17T04:32:09.483

Answers

0

Routing tables are meant only to decide where Internet Protocol packets go. Redirection of specific transmission-protocol ports is not the task of routing tables.

What you want can probably be done with Netfilter (iptables SNAT), but I'm a little bit rusty in that department.

Ярослав Рахматуллин

Posted 2013-03-17T04:06:32.413

Reputation: 9 076