Domain-Specific VPN Router
github.com
github.com
My family could then 'just use' Netflix on their various devices without me having to turn it on at the same time as I play a game without my ping being sent through the roof routing to the US and back.
PS: any Aussies out there, I am not telling you to do this. We're not allowed to use Netflix according to the ToS/EULA.
Edit: that is to say, Netflix is one of many. See also BBC iPlayer, Apple radio, etc. etc.
By the way, is this achievable via OpenWrt or something similar?
It's nice because it requires no network changes, only DNS settings on the media player device.
So this might be marginally useful for things like watching US streaming services from overseas or using it with point to point protocols, like SMTP/IMAP, etc...
But not for anything that requires any degree of operational security.
http://git.zx2c4.com/ipset-dns/about/
I wasn't satisfied with it being standalone and having to forward things to my real resolver, so I went ahead and wrote a patch for DNSMasq that got accepted:
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/201...
So in your dnsmasq config, just add:
ipset=/whatever.com/myipset
And then you can do the ordinary matches in iptables to adjust packets as you please, using fwmarks if you need to affect routing.
Both tools are included in OpenWRT now as well, if you want to run it on a device.
I've been trying to find a super-cheap embedded board with better crypto performance. A silvermont atom might be the best choice, and use the crypto performance both for VPN and for some kind of NAS with good disk crypto.
Also, SSH tunnels are tunneling TCP over TCP (I assume that the VPN support operates in a similar way). See sshuttle for something better.
On the server, set "PermitTunnel yes" in /etc/ssh/sshd_config, and run (as root):
sysctl -w net.ipv4.ip_forward=1
ip tuntap add dev tun0 mode tun
ip addr add $SERVER/32 peer $CLIENT/32 dev tun0
ip link set dev tun0 up
arp -sD $CLIENT eth0 pub
On the client, run (as root): ip tuntap add dev tun0 mode tun
ip addr add $CLIENT/32 peer $SERVER/$PREFIX dev tun0
ip link set dev tun0 up
The above settings need only be run once (unless you reboot the machines).Back on the server, as your normal user, run "ssh -w 0:0 user@$CLIENT" to establish the connection. The -N, -f, -oExitOnForwardFailure=yes, and -oServerAliveInterval=15 options may also be desired.
$SERVER is the IP of the computer in the network you want to tunnel into.
$CLIENT is the IP selected for the computer you want to tunnel from. Note: it is not the client's public IP! You should pick an unused one on the destination network. If you can't do this, then you can only tunnel to the server itself.
$PREFIX is the size of the prefix of the network you want to forward (typically 16 or 24).
If you only want to tunnel to the server itself, then $PREFIX should be 32, and you can skip the sysctl and arp commands on the server.
If you have other tunX devices in use, adjust the tunnel device numbers accordingly (don't forget about changing ssh's -w argument too).
This won't work if the client is also behind a NAT gateway or on a private network.
(Personally I would put it into a script, because I usually don't remember things like that.)
Hmm, do you think this could be solved more elegantly on using a VM Containing a Cumulus Networks OS with a programmable Virtualized Network Stack?
Adapting this to run on a host (which would be configured to use the DNS proxy running on itself) with VPN connections terminating on the host shouldn't be too difficult. There's certainly a use case for doing this on a router but I could definitely see wanting this on my laptop, too.
http://www.h-online.com/security/features/A-death-blow-for-P...
With that in mind, I'd say wait.
That said, always great to see evolved routing techniques that can be controlled ("defined") by software.
edit : fwiw, i have used it for writing a rfc-3315 (and a few extensions) compliant dhcpv6 client, and it made the entire experience great fun.
Awesome project.