Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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         UG    0      0        0 eth0     *        U     0      0        0 wlan0    *        U     0      0        0 eth0
share|improve this question
You 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 Mar 17 '13 at 4:32

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .