5

I am using sshuttle to get cleanly out of a questionable hotel wifi connection. I have a little travel router and would like to use it as well, briding my laptop's sshuttle connection so I can connect my phone to the router and have it tunnelled as well.

I have my laptop talking to both correctly, but can't get the router traffic out to sshuttle. I'm sure there's some iptables magic that can help me.

I'm starting sshuttle like this:

sshuttle -e 'ssh -C' --dns -r userid@remote.host 0.0.0.0/0 -x 10.10.10.0/24

From iptables-save after starting sshuttle (the router is 10.10.10.1):

*nat
:PREROUTING ACCEPT [1:92]
:INPUT ACCEPT [1:92]
:OUTPUT ACCEPT [6:428]
:POSTROUTING ACCEPT [110:7243]
:sshuttle-12300 - [0:0]
-A PREROUTING -j sshuttle-12300
-A OUTPUT -j sshuttle-12300
-A sshuttle-12300 -d 10.10.10.0/24 -p tcp -j RETURN
-A sshuttle-12300 -d 127.0.0.0/8 -p tcp -j RETURN
-A sshuttle-12300 -p tcp -m ttl ! --ttl-eq 42 -j REDIRECT --to-ports 12300
-A sshuttle-12300 -d 127.0.1.1/32 -p udp -m udp --dport 53 -m ttl ! --ttl-eq 42 -j REDIRECT --to-ports 12300
COMMIT

Can anybody help me get that traffic from 10.10.10.0/24 into the redirect?

Greg Baker
  • 51
  • 2
  • In your command you exclude 10.10.10.0/24 using the `-x` parameter. And now you are asking to get the traffic into the redirect. In that case remove the `-x 10.10.10.0/24`... – Lambert Apr 03 '15 at 09:45
  • I am still unable to connect through the router without that option (and I'm unable to connect to the router to see what's happening there, which is why I added it in the first place). – Greg Baker Apr 03 '15 at 11:52

1 Answers1

5

I think you want this (awfully phrased option)...

-l, --listen ... transproxy to this ip address and port number

for something like...

shuttle -l 0.0.0.0 -e 'ssh -C' ....

or if that doesn't work, i'd try -l 10.10.10.1, or whatever the address is of your LAN interface.

sshuttle ROCKS, but the documentation, is well, iffy. i mean, WTF does transproxy mean? that is SO NOT a word, lol.

mralexgray
  • 788
  • 3
  • 8
  • 20