Yedino-VPNout

From PeerFreedom Wiki
Jump to navigation Jump to search

To use VPNout


NEW VERSION:

and edit options below !!

  • isp_dev="wlp3s0" your normal internet device like eth0
  • isp_myip your normal IP on the normal card, like LAN IP usually, with netmask like /24
  • brd is the broadcast - usually .255 for /24 netmask
  • net is network, usually .0 for /24 netmask
  • GW is the gateway that you normally use to get from e.g. LAN to Internet, usually .1 like 192.168.1.1
./tunserver.elf  --peer 51.68.136.51:9042-fd42:7511:190d:2424:781a:5693:f163:a2d3  --vpnout-use-provider fd42:7511:190d:2424:781a:5693:f163:a2d3  --tun-ipv4-address 10.142.0.2  --q &

set -x

ip r del default
ip r flush all

dhclient -v

isp_dev="wlp3s0"
isp_myip="192.168.1.115/24"
isp_brd="192.168.1.255"
isp_net="192.168.1.0/24"
isp_gw="192.168.1.1"

ip a add "$isp_myip" brd "$isp_brd" dev "$isp_dev" # normal internet card needs to exist (for peering)
ip r add "$isp_net" dev "$isp_dev"

#ip r add 10.0.0.0/8 dev galaxy0 # src 10.142.0.2

#ip r add default via 10.0.2.2

# use normal interent to go into this peers:
ip r add 185.238.72.170 via "$isp_gw"    # dev eth0
ip r add 51.68.136.51 via "$isp_gw"    # dev eth0

# VPN by default
ip r add default via 10.142.0.2

old version

  1. Start Yedino

with special options, and with some peer like:

nohup ./tunserver.elf  --peer 51.68.136.51:9042-fd42:7511:190d:2424:781a:5693:f163:a2d3  --vpnout-use-provider fd42:7511:190d:2424:781a:5693:f163:a2d3    --tun-ipv4-address 10.142.0.2   --q &
  1. Configure routing

AFTER doing the above, you can use this kind of script to configure routing and routing exception to over-internet-peers

set -x

sleep 3

ip r del default
ip r flush all

dhclient -v

ip a add 10.0.2.15/24 brd 10.0.2.255 dev eth0 # normal internet card needs to exist (for peering)
ip r add 10.0.2.0/24 dev eth0

ip r add 10.0.0.0/8 dev galaxy0 # src 10.142.0.2

#### ip r add default via 10.0.2.2

# use normal interent to go into this peers:
ip r add 185.238.72.170/32 via 10.0.2.2    # dev eth0
ip r add 51.68.136.51 via 10.0.2.2         # dev eth0

# VPN by default
ip r add default via 10.142.0.1