At the moment I'm working at a company and the problem is they allow SSH on wifi but not on their wired network. At the moment I push everything through a vpn, but that gives overhead on an already slow network.
I was wondering how I could make all my traffic go through my eth0 but make my ssh connection use wlan0 instead of eth0.
It's important all other traffic goes through eth0 as the wifi here is extremely slow, but just fast enough for a simple shell.
Set up
eth0
as the default route, set up an alternate route throughwlan0
, and configure the ssh traffic to go through the alternate route.Install the
iproute
package to manipulate routing tables through theip
command. Mark the outgoing packets that you want to re-route, and set up a routing rule to route those packets through a different interface. Untested:It's somewhat complex. You will need to create an alternative route table, use iptables to mark the package and add a routing rule to force the kernel to use the alternate routing table when the package is marked.
You have a good tutorial for a somewhat more complex setup here.
Are you wanting this to be used on just your computer or are you wanting to route all traffic on your network this way? If just yours do you have both eth0 and wlan0 interfaces running and configured to access your network? Just some basic questions so that i can better assist with the proper answer.