Skip to content

Instantly share code, notes, and snippets.

@Juul
Created November 10, 2019 09:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Juul/9bbf5f7fc60e3ad37e0fcedc598ac4b2 to your computer and use it in GitHub Desktop.
Save Juul/9bbf5f7fc60e3ad37e0fcedc598ac4b2 to your computer and use it in GitHub Desktop.
ppp_tunnel_notes

sit tunnel

client

ip tunnel add sit1 mode sit ttl 100 remote 107.170.232.149 local 173.132.20.41
ip addr add 172.30.0.1/24 dev sit1
ip link set dev sit1 up
echo 1 > /proc/sys/net/ipv4/ip_forward

server

ip tunnel add sit1 mode sit ttl 100 remote 173.132.20.41 local 107.170.232.149
ip addr add 172.30.0.2/24 dev sit1
ip link set dev sit1 up
echo 1 > /proc/sys/net/ipv4/ip_forward

userspace ppp tunnel

client

https://rudd-o.com/linux-and-free-software/mola-the-poor-mans-anonymizing-vpn-tunnel-using-ssh-and-pppd

contents of /etc/ppp/options

lock
noauth
noproxyarp

run:

pppd pty "nc juul.io 1234" 172.30.0.2:172.30.0.1 local nodetach silent
ip link set dev ppp0 up
ip addr add dev ppp0 172.30.0.2/24

server

contents of /etc/ppp/options

lock
noauth
ipcp-accept-local
ipcp-accept-remote
noproxyarp

run:

pppd pty "nc -l 1234" 172.30.0.1:172.30.0.2 local nodetach silent
ip link set dev ppp0 up
ip addr add dev ppp0 172.30.0.1/24

socat

ToDo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment