diff options
Diffstat (limited to 'sshuttle/methods/nat.py')
-rw-r--r-- | sshuttle/methods/nat.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sshuttle/methods/nat.py b/sshuttle/methods/nat.py index d198b4f..912555d 100644 --- a/sshuttle/methods/nat.py +++ b/sshuttle/methods/nat.py @@ -50,6 +50,12 @@ class Method(BaseMethod): _ipt('-I', 'OUTPUT', '1', *args) _ipt('-I', 'PREROUTING', '1', *args) + # Firstly we always skip all LOCAL addtrype address, i.e. avoid + # tunnelling the traffic designated to all local TCP/IP addresses. + _ipt('-A', chain, '-j', 'RETURN', + '-m', 'addrtype', + '--dst-type', 'LOCAL') + # create new subnet entries. for _, swidth, sexclude, snet, fport, lport \ in sorted(subnets, key=subnet_weight, reverse=True): |