nnev / spawn-ns Goto Github PK
View Code? Open in Web Editor NEWLinux network namespace script awesomeness
License: Other
Linux network namespace script awesomeness
License: Other
First, kill dhclient, vpnc, openvpn. Leave eth0 up. Then, in order, run: # First layer: DHCP. Does not use --gw or --dns since the DHCP-Client sets # these. # BEWARE: Not using --dns will lead to using/modifying the host’s # /etc/resolv.conf. In this case, we want this. $ spawn-ns \ --name dhcp \ --ip 10.0.1.1 \ --donate-dev eth0 \ --command "spawn-ns-outer-watchdog \"dhclient -d eth0\" '--ping-ip=8.8.8.8 --wait=10'" # Second layer: VPNC. Does not use --dns since we want to use the # /etc/resolv.conf which was generated by the DHCP-Client to reach the # whitelisted nameservers. $ spawn-ns \ --name vpnc \ --ip 10.0.2.1 \ --gw 10.0.1.1 \ --command "spawn-ns-outer-watchdog 'vpnc' '--ping-ip=8.8.8.8 --wait=10'" # Third layer: OpenVPN. Also does not use --dns, mainly because it doesn’t need # it and external DNS servers might not (yet) work in the Cisco VPN. $ spawn-ns \ --name ovpn \ --ip 10.0.3.1 \ --gw 10.0.2.1 \ --command "spawn-ns-outer-watchdog 'openvpn' '--ping-ip=8.8.8.8 --wait=10'" # Host routes through highest layer: $ ip route add default via 10.0.3.1 Fix any iptables NAT rules which use a specific interface, so that they use the interface 'vbr'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.