Giter VIP home page Giter VIP logo

spawn-ns's Introduction

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'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.