Skip to content

Add uvpn #57

Merged
merged 10 commits into from
Nov 2, 2018
Merged

Add uvpn #57

merged 10 commits into from
Nov 2, 2018

Conversation

donald
Copy link
Collaborator

@donald donald commented Nov 2, 2018

This tool allows a user to create a (net,mnt,user)-namespace container
which can be used to run openvpn.

This tools uses sudo to gain privileges for the setup and requires
a line like

ALL ALL=NOPASSWD: /usr/bin/uvpn start_as_root,/usr/bin/uvpn stop_as_root

in the sudoers file.

The container will be connected to the guest network. For this the
system needs a working vlan.guest0 vlan interface into the guest
network.

The usage for the user might be along this pattern:

uvpn start
uvpn exec openvpn ~/.charite-username.ovpn
echo -e "search charite.de\nnameserver 141.42.1.1\nnameserver 141.14.16.1" | uvpn exec bash -c 'cat > /etc/resolv.conf'
uvpn exec firefox --new-instance --ProfileManager
uvpn exec firefox --new-instance -P charite
uvpn show
uvpn stop_container

Because the network of the container is separate from the host system,
ip based X11-forward will not work without more setup. So the above example
would only work on the local workstation.

@pmenzel
Copy link
Contributor

pmenzel commented Nov 2, 2018

The last sentence in the description is incomplete, and GitHub warns about a conflict with install.sh.

@donald
Copy link
Collaborator Author

donald commented Nov 2, 2018

Fixed the description. I'll rebase.

This file is taken from dhcp-4.3.2-0.x86_64/source/client/scripts/linux.

The code will be embedded in th uvpn script in a later commit, but in an
updated and reduced form. This external copy of the file serves as
documentation so we can track the changes done to the code in the repository.
This tools allows a user to create a (net,mnt,user)-namespace container
which can be used to run openvpn.

This tools uses sudo to gain privileges for the setup and requires
a line like

    ALL ALL=NOPASSWD: /usr/bin/uvpn start_as_root,/usr/bin/uvpn stop_as_root

in the sudoers file.

The container will be connected to the guest network. For this the
system needs a working vlan.guest0 vlan interface into the guest
network.

The usage for the user might be along this pattern:

    uvpn start
    uvpn exec openvpn ~/.charite-username.ovpn
    echo -e "search charite.de\nnameserver 141.42.1.1\nnameserver 141.14.16.1" | uvpn exec bash -c 'cat > /etc/resolv.conf'
    uvpn exec firefox --new-instance --ProfileManager
    uvpn exec firefox --new-instance -P charite
    uvpn show
    uvpn stop_container

Because the network of the container is separate from the host system,
ip based X11-forward will not work without more setup. So the above example
would only work on the local workstation.
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants