{"action":"created","issue":{"url":"https://api.github.com/repos/sshuttle/sshuttle/issues/45","labels_url":"https://api.github.com/repos/sshuttle/sshuttle/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/sshuttle/sshuttle/issues/45/comments","events_url":"https://api.github.com/repos/sshuttle/sshuttle/issues/45/events","html_url":"https://github.com/sshuttle/sshuttle/issues/45","id":121937456,"number":45,"title":"sshuttle doesn't hide my IPV6 address","user":{"login":"naclander","id":5856032,"avatar_url":"https://avatars.githubusercontent.com/u/5856032?v=3","gravatar_id":"","url":"https://api.github.com/users/naclander","html_url":"https://github.com/naclander","followers_url":"https://api.github.com/users/naclander/followers","following_url":"https://api.github.com/users/naclander/following{/other_user}","gists_url":"https://api.github.com/users/naclander/gists{/gist_id}","starred_url":"https://api.github.com/users/naclander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naclander/subscriptions","organizations_url":"https://api.github.com/users/naclander/orgs","repos_url":"https://api.github.com/users/naclander/repos","events_url":"https://api.github.com/users/naclander/events{/privacy}","received_events_url":"https://api.github.com/users/naclander/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-12-13T19:13:49Z","updated_at":"2015-12-14T01:48:22Z","closed_at":null,"body":"I've been using sshuttle for a number of years now, and recently my ISP rolled out IPV6 support. \r\nThe sshuttle command I use is:\r\n\r\n    sshuttle --no-latency-control -vvr username@remote.server 0/0 -x 10.0.0.0/24\r\n\r\nSometimes I add the ````--dns```` flag as well.\r\n\r\nThis has been working fine, and continuous to work fine, for sites that show me an IPV4 address. For example, http://www.whatsmyip.org/ correctly shows me remote.server's address, instead of my real one. And I see what looks like correct activity from the sshuttle debug output.\r\n\r\nHowever I've recently noticed that sites responding back with an IPV6 (have IPV6 support?) are still showing me my real IPV6 address. For example:\r\n\r\n    https://www.google.com/search?q=google+what%27s+my+ip&ie=utf-8&oe=utf-8\r\n    icanhazip.com\r\n\r\nWhen accessing those sites or downloading anything from them I see no output from sshuttle, which makes me suspect sshuttle is getting bypassed somehow and doesn't intercept the IPV6 traffic (although I am just guessting). \r\nFurthermore if the ````--dns```` flag is used I do see the dns query go through for those sites, just not the traffic. My best guess for this would be that whichever DNS I'm using isn't configured for IPV6, and so sshuttle still intercepts the traffic. \r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sshuttle/sshuttle/issues/comments/164320988","html_url":"https://github.com/sshuttle/sshuttle/issues/45#issuecomment-164320988","issue_url":"https://api.github.com/repos/sshuttle/sshuttle/issues/45","id":164320988,"user":{"login":"naclander","id":5856032,"avatar_url":"https://avatars.githubusercontent.com/u/5856032?v=3","gravatar_id":"","url":"https://api.github.com/users/naclander","html_url":"https://github.com/naclander","followers_url":"https://api.github.com/users/naclander/followers","following_url":"https://api.github.com/users/naclander/following{/other_user}","gists_url":"https://api.github.com/users/naclander/gists{/gist_id}","starred_url":"https://api.github.com/users/naclander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naclander/subscriptions","organizations_url":"https://api.github.com/users/naclander/orgs","repos_url":"https://api.github.com/users/naclander/repos","events_url":"https://api.github.com/users/naclander/events{/privacy}","received_events_url":"https://api.github.com/users/naclander/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T01:48:22Z","updated_at":"2015-12-14T01:48:22Z","body":"````\r\nsudo ./run --method=tproxy -vv --exclude 131.179.104.17 -r naclander@ssh.linux.ucla.edu 0/0\r\nPython 3.5.1\r\nStarting sshuttle proxy.\r\nfirewall manager: Starting firewall with Python version 3.5.1\r\nfirewall manager: ready method name tproxy.\r\nUDP enabled: True\r\nBinding redirector: 12300\r\nTCP redirector listening on ('::1', 12300, 0, 0).\r\nTCP redirector listening with <socket.socket fd=5, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::1', 12300, 0, 0)>.\r\nTCP redirector listening on ('127.0.0.1', 12300).\r\nTCP redirector listening with <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 12300)>.\r\nUDP redirector listening on ('::1', 12300, 0, 0).\r\nUDP redirector listening with <socket.socket fd=8, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('::1', 12300, 0, 0)>.\r\nUDP redirector listening on ('127.0.0.1', 12300).\r\nUDP redirector listening with <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 12300)>.\r\ntproxy UDP support enabled.\r\nStarting client with Python version 3.5.1\r\nc : connecting to server...\r\nc : executing: ['ssh', 'naclander@ssh.linux.ucla.edu', '--', 'P=python3.5; $P -V 2>/dev/null || P=python; exec \"$P\" -c \\'import sys, os; verbosity=2; sys.stdin = os.fdopen(0, \"rb\"); exec(compile(sys.stdin.read(937), \"assembler.py\", \"exec\"))\\'']\r\nc :  > channel=0 cmd=PING len=7 (fullness=0)\r\nserver: assembling u'sshuttle' (7 bytes)\r\nserver: assembling u'sshuttle.cmdline_options' (27 bytes)\r\nserver: assembling u'sshuttle.helpers' (949 bytes)\r\nserver: assembling u'sshuttle.ssnet' (5540 bytes)\r\nserver: assembling u'sshuttle.hostwatch' (2340 bytes)\r\nserver: assembling u'sshuttle.server' (3074 bytes)\r\nStarting server with Python version 2.7.3\r\n s: latency control setting = True\r\n s: available routes:\r\n s:   2/131.179.104.0/24\r\n s:  > channel=0 cmd=PING len=7 (fullness=0)\r\nc : Connected.\r\nc : Waiting: 3 r=[5, 7, 8, 9, 11] w=[11] x=[] (fullness=7/0)\r\nc :   Ready: 3 r=[] w=[11] x=[]\r\nc : mux wrote: 15/15\r\nc : Waiting: 3 r=[5, 7, 8, 9, 11] w=[] x=[] (fullness=7/0)\r\n s:  > channel=0 cmd=ROUTES len=19 (fullness=7)\r\n s: Waiting: 1 r=[4] w=[5] x=[] (fullness=26/0)\r\n s:   Ready: 1 r=[] w=[5] x=[]\r\n s: mux wrote: 15/15\r\n s: Waiting: 1 r=[4] w=[5] x=[] (fullness=26/0)\r\n s:   Ready: 1 r=[] w=[5] x=[]\r\n s: mux wrote: 27/27\r\n s: Waiting: 1 r=[4] w=[] x=[] (fullness=26/0)\r\nc :   Ready: 3 r=[11] w=[] x=[]\r\nc : <  channel=0 cmd=PING len=7\r\nc :  > channel=0 cmd=PONG len=7 (fullness=7)\r\nc : <  channel=0 cmd=ROUTES len=19\r\nfirewall manager: Got subnets: [(2, 0, False, '0.0.0.0'), (2, 8, True, '127.0.0.0'), (2, 32, True, '131.179.104.17')]\r\nfirewall manager: Got nslist: []\r\nfirewall manager: Got ports: 12300,12300,0,0\r\nfirewall manager: Got udp: True\r\nfirewall manager: setting up.\r\nfirewall manager: setting up IPv6.\r\nfirewall manager: setting up IPv4.\r\n>> iptables -t mangle -N sshuttle-m-12300\r\n>> iptables -t mangle -F sshuttle-m-12300\r\n>> iptables -t mangle -N sshuttle-d-12300\r\n>> iptables -t mangle -F sshuttle-d-12300\r\n>> iptables -t mangle -N sshuttle-t-12300\r\n>> iptables -t mangle -F sshuttle-t-12300\r\n>> iptables -t mangle -I OUTPUT 1 -j sshuttle-m-12300\r\n>> iptables -t mangle -I PREROUTING 1 -j sshuttle-t-12300\r\n>> iptables -t mangle -A sshuttle-d-12300 -j MARK --set-mark 1\r\n>> iptables -t mangle -A sshuttle-d-12300 -j ACCEPT\r\n>> iptables -t mangle -A sshuttle-t-12300 -m socket -j sshuttle-d-12300 -m tcp -p tcp\r\n s:   Ready: 1 r=[4] w=[] x=[]\r\n s: <  channel=0 cmd=PING len=7\r\n s:  > channel=0 cmd=PONG len=7 (fullness=26)\r\n s: mux wrote: 15/15\r\n s: Waiting: 1 r=[4] w=[] x=[] (fullness=33/0)\r\n>> iptables -t mangle -A sshuttle-t-12300 -m socket -j sshuttle-d-12300 -m udp -p udp\r\n>> iptables -t mangle -A sshuttle-m-12300 -j RETURN --dest 131.179.104.17/32 -m tcp -p tcp\r\n>> iptables -t mangle -A sshuttle-t-12300 -j RETURN --dest 131.179.104.17/32 -m tcp -p tcp\r\n>> iptables -t mangle -A sshuttle-m-12300 -j RETURN --dest 131.179.104.17/32 -m udp -p udp\r\n>> iptables -t mangle -A sshuttle-t-12300 -j RETURN --dest 131.179.104.17/32 -m udp -p udp\r\n>> iptables -t mangle -A sshuttle-m-12300 -j RETURN --dest 127.0.0.0/8 -m tcp -p tcp\r\n>> iptables -t mangle -A sshuttle-t-12300 -j RETURN --dest 127.0.0.0/8 -m tcp -p tcp\r\n>> iptables -t mangle -A sshuttle-m-12300 -j RETURN --dest 127.0.0.0/8 -m udp -p udp\r\n>> iptables -t mangle -A sshuttle-t-12300 -j RETURN --dest 127.0.0.0/8 -m udp -p udp\r\n>> iptables -t mangle -A sshuttle-m-12300 -j MARK --set-mark 1 --dest 0.0.0.0/0 -m tcp -p tcp\r\n>> iptables -t mangle -A sshuttle-t-12300 -j TPROXY --tproxy-mark 0x1/0x1 --dest 0.0.0.0/0 -m tcp -p tcp --on-port 12300\r\n>> iptables -t mangle -A sshuttle-m-12300 -j MARK --set-mark 1 --dest 0.0.0.0/0 -m udp -p udp\r\n>> iptables -t mangle -A sshuttle-t-12300 -j TPROXY --tproxy-mark 0x1/0x1 --dest 0.0.0.0/0 -m udp -p udp --on-port 12300\r\nc : mux wrote: 15/15\r\nc : <  channel=0 cmd=PONG len=7\r\nc : received PING response\r\nc : Waiting: 3 r=[5, 7, 8, 9, 11] w=[] x=[] (fullness=0/0)\r\n s:   Ready: 1 r=[4] w=[] x=[]\r\n s: <  channel=0 cmd=PONG len=7\r\n s: received PING response\r\n s: Waiting: 1 r=[4] w=[] x=[] (fullness=0/0)\r\nc :   Ready: 3 r=[9] w=[] x=[]\r\nc : Accept UDP: ('10.0.0.239', 58343) -> ('10.0.0.182', 53).\r\nfirewall manager: undoing changes.\r\nfirewall manager: undoing IPv6 changes.\r\nfirewall manager: undoing IPv4 changes.\r\n>> iptables -t mangle -D OUTPUT -j sshuttle-m-12300\r\n>> iptables -t mangle -F sshuttle-m-12300\r\n>> iptables -t mangle -X sshuttle-m-12300\r\n>> iptables -t mangle -D PREROUTING -j sshuttle-t-12300\r\n>> iptables -t mangle -F sshuttle-t-12300\r\n>> iptables -t mangle -X sshuttle-t-12300\r\n>> iptables -t mangle -F sshuttle-d-12300\r\n>> iptables -t mangle -X sshuttle-d-12300\r\nfirewall manager: undoing /etc/hosts changes.\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.5/runpy.py\", line 170, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/naclandr/Projects/sshuttle/sshuttle/__main__.py\", line 216, in <module>\r\n    opt.daemon, opt.pidfile)\r\n  File \"/home/naclander/Projects/sshuttle/sshuttle/client.py\", line 645, in main\r\n    seed_hosts, auto_nets, daemon)\r\n  File \"/home/naclander/Projects/sshuttle/sshuttle/client.py\", line 488, in _main\r\n    ssnet.runonce(handlers, mux)\r\n  File \"/home/naclander/Projects/sshuttle/sshuttle/ssnet.py\", line 583, in runonce\r\n    h.callback(s)\r\n  File \"/home/naclander/Projects/sshuttle/sshuttle/client.py\", line 117, in <lambda>\r\n    lambda sock: callback(sock, method, mux, handlers)\r\n  File \"/home/naclander/Projects/sshuttle/sshuttle/client.py\", line 357, in onaccept_udp\r\n    mux.send(chan, ssnet.CMD_UDP_OPEN, listener.family)\r\n  File \"/home/naclander/Projects/sshuttle/sshuttle/ssnet.py\", line 376, in send\r\n    assert isinstance(data, binary_type)\r\nAssertionError\r\n````\r\n"}}