|
1 | 1 | Usage |
2 | 2 | ===== |
| 3 | + |
| 4 | +.. note:: |
| 5 | + |
| 6 | + For information on usage with Windows, see the :doc:`windows` section. |
| 7 | + For information on using the TProxy method, see the :doc:`tproxy` section. |
| 8 | + |
3 | 9 | - Forward all traffic:: |
4 | 10 |
|
5 | 11 | sshuttle -r username@sshserver 0.0.0.0/0 |
@@ -51,45 +57,3 @@ the data back and forth through ssh. |
51 | 57 | Fun, right? A poor man's instant VPN, and you don't even have to have |
52 | 58 | admin access on the server. |
53 | 59 |
|
54 | | -Additional information for TPROXY |
55 | | ---------------------------------- |
56 | | -TPROXY is the only method that supports full support of IPv6 and UDP. |
57 | | - |
58 | | -There are some things you need to consider for TPROXY to work: |
59 | | - |
60 | | -- The following commands need to be run first as root. This only needs to be |
61 | | - done once after booting up:: |
62 | | - |
63 | | - ip route add local default dev lo table 100 |
64 | | - ip rule add fwmark 1 lookup 100 |
65 | | - ip -6 route add local default dev lo table 100 |
66 | | - ip -6 rule add fwmark 1 lookup 100 |
67 | | - |
68 | | -- The ``--auto-nets`` feature does not detect IPv6 routes automatically. Add IPv6 |
69 | | - routes manually. e.g. by adding ``'::/0'`` to the end of the command line. |
70 | | - |
71 | | -- The client needs to be run as root. e.g.:: |
72 | | - |
73 | | - sudo SSH_AUTH_SOCK="$SSH_AUTH_SOCK" $HOME/tree/sshuttle.tproxy/sshuttle --method=tproxy ... |
74 | | - |
75 | | -- You may need to exclude the IP address of the server you are connecting to. |
76 | | - Otherwise sshuttle may attempt to intercept the ssh packets, which will not |
77 | | - work. Use the ``--exclude`` parameter for this. |
78 | | - |
79 | | -- Similarly, UDP return packets (including DNS) could get intercepted and |
80 | | - bounced back. This is the case if you have a broad subnet such as |
81 | | - ``0.0.0.0/0`` or ``::/0`` that includes the IP address of the client. Use the |
82 | | - ``--exclude`` parameter for this. |
83 | | - |
84 | | -- You need the ``--method=tproxy`` parameter, as above. |
85 | | - |
86 | | -- The routes for the outgoing packets must already exist. For example, if your |
87 | | - connection does not have IPv6 support, no IPv6 routes will exist, IPv6 |
88 | | - packets will not be generated and sshuttle cannot intercept them:: |
89 | | - |
90 | | - telnet -6 www.google.com 80 |
91 | | - Trying 2404:6800:4001:805::1010... |
92 | | - telnet: Unable to connect to remote host: Network is unreachable |
93 | | - |
94 | | - Add some dummy routes to external interfaces. Make sure they get removed |
95 | | - however after sshuttle exits. |
0 commit comments