[LARTC] ppp0/ppp1 ssh

Jettero Heller lartc@voltar-confed.org
Sat, 28 Apr 2001 13:53:00 -0400


This seems so simple I can't believe it doesn't work yet.
I have two modems connected to two ISPs.  I route everything
through the "fast" one with:
    ip route default via xxx.xxx.xxx.xxx dev ppp0

Then to the machine I regularly tf and ssh, I add this:
    ip route tf.tf.tf.tf     via xxx.xxx.xxx.xxx dev ppp1
    ip route ssh.ssh.ssh.ssh via xxx.xxx.xxx.xxx dev ppp1
    
The reason I joined this list is that I'd rather do
something like this, but I can't get it to work right.

    ip route add default via xxx.xxx.xxx.xxx dev ppp1 tos 0x10

    for i in 22 23 8000; do 
        iptables -t mangle -A PREROUTING -p tcp 
                 --dport $i -j TOS --set-tos 0x10; done

I would have figured everything for port 22, 23 and 8000
would go out ppp1 and come back ppp1, but I was rather
suprised to find that _all_ my traffic goes out ppp0, but
the stuff I tagged 0x10 comes back in ppp1?!?

What am I missing?