1

I'm currently using sshuttle to access some VPN-restricted resources, the vanilla version of "route everything" works fine but I'd like to know how to use it to route only traffic to those servers.

I should mention that I'm not familiar with the subnet notation and most networking concepts, it's probably trivial for someone with the background knowledge.

Thank you.

Jesse Adelman
  • 978
  • 5
  • 15
Samus_
  • 249
  • 3
  • 9
  • 1
    by the way I couldn't add "sshuttle" as a tag due to my low karma in this forum, if someone wishes to add it I'll appreciate it, thanks. – Samus_ Jan 22 '14 at 17:33
  • If you are configuring VPN and routing components, it's probably in your best interest to learn CIDR notation and other basic concepts, as they're core to everything you'll be doing. – EEAA Jan 22 '14 at 18:08
  • 1
    This question has nearly everything you'll need to know to get started: http://serverfault.com/questions/49765/how-does-ipv4-subnetting-work – EEAA Jan 22 '14 at 18:10
  • Added sshuttle tag. :D – Jesse Adelman Sep 17 '17 at 20:10

1 Answers1

2

I started reading Beej's Guide to Network Programming and while I still don't fully understand everything involved here, I've found the answer I was looking for.

To only route traffic to a speficic host you should use <IPv4-address>/32 instead of 0/0 as in the example.

My reasoning was that if 0/0 means "route everything" and /0 means "all the address is the host portion" then to reverse it I should specify the address I want to connect to and also make it entirely the network portion which turns out to be /32 for IPv4.

Samus_
  • 249
  • 3
  • 9
  • Looking at the verbose output of sshuttle, if you specify /0, it the software translates that to mean /32. Not that your answer is wrong for networking, generally. – Jesse Adelman Sep 17 '17 at 20:10