#!/usr/bin/env bash # install iproute net-tools yum install -y iproute yum install -y net-tools # create tun device ip tuntap add dev tun0 mode tun # add ip addr for tun device ip addr add 192.168.3.11/24 dev tun0 # kernel open ip forward echo 1 > /proc/sys/net/ipv4/ip_forward # start up tun0 ifconfig tun0 up