aboutsummaryrefslogtreecommitdiff
path: root/files/create_openvpn_interface
blob: 87d9144bf9ff9fb6f481a9f4c8c04bc397a1ec54 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

DEV="$1"
SUBNET="$2"

openvpn --mktun --dev "$DEV"
ip link set dev "$DEV" txqueuelen 100
ifconfig "$DEV" "$SUBNET".1 pointopoint "$SUBNET".2 mtu 1500
route add -net "$SUBNET".0 netmask 255.255.255.0 gw "$SUBNET".2