sshuttle / sshuttle/sshuttle

DNS resolving for remote subnets

Open
#844 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.6k
Forks
795
Avg merge
8h 49m
Merged PRs (30d)
12

Description

Let's say I want to use sshuttle only to be used only for traffic directed to a specific host-name and all its subdomains like "*.example.com".
Whats the best way to achieve this? Also note that example.com can only be resolved on the remote nerwork.

I tried:
sshuttle -H -r <username>@<remotehost> --exclude 0/0 "*.example.com" but the wildcard does not to seem to work as intended and also if I list a couple of subdomains in a subnets-file I will get a unable to resolve adress: ex.example.com error because sshuttle tries to resolve the hostnames before it makes the connection (--dns flag did not help).

I looked through some other issues and some seem very related to this. Also there seemed to be an old branch which tried to solve remote subnets remotely if not found via local DNS.

Are there any updates on this? Also what is the intended way to specify a domain with wildcards of subnets?

All that worked for me so far was specifiying IP-adresses of the remote host-names in my /etc/hosts file for initial resolution and listing up all subdomains in a subdomain file.
sshuttle -H -r <username>@<remotehost> --exclude 0/0 -s ./subnets.txt

But this way there is no guarantee to catch all subdomains and also the host file is vulnerable to changing IP adresses of the remote names.

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented command variants using -H, --dns, --exclude, and a subnets file, including names resolvable only on the remote network. Trace the DNS and subnet-selection entry points to determine the intended wildcard and remote-resolution behavior; done should include a defined, testable way to route a domain and its subdomains.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.