#!/bin/sh # adapted from # https://unix.stackexchange.com/questions/149293/feed-all-traffic-through-openvpn-for-a-specific-network-namespace-only # vpn_wrapper.sh passes the following variables through openvpn's # --setenv option: # NAMESPACE_NAME # WRAPPER_PID # VETH_HOST0 # VETH_HOST1 # ROUTE_THROUGH_VETH # PHYSICAL_IP case $script_type in up) ip netns add $NAMESPACE_NAME ip netns exec $NAMESPACE_NAME ip link set dev lo up ip link set dev "$1" up netns $NAMESPACE_NAME mtu "$2" ip netns exec $NAMESPACE_NAME ip addr add dev "$1" \ "$4/${ifconfig_netmask:-30}" \ ${ifconfig_broadcast:+broadcast "$ifconfig_broadcast"} if [ -n "$ifconfig_ipv6_local" ]; then ip netns exec $NAMESPACE_NAME ip addr add dev "$1" \ "$ifconfig_ipv6_local"/112 fi # the following is done to enable some connections to bypass vpn
aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests/singularity.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/tests/singularity.scm')
0 files changed, 0 insertions, 0 deletions