Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
1  
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.