Pptpd Setup for Eveonline: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
(Created page with " pptp server: AWS linux box. ubuntu 18 user-data: <pre> #!/bin/bash # ref https://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/ apt-get -y install pptpd...")
 
No edit summary
Line 68: Line 68:




[[image:
[[image:windows_10_use_default_gateway.png]]

Revision as of 03:16, 3 February 2020

pptp server: AWS linux box. ubuntu 18

user-data:

#!/bin/bash
# ref https://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/

apt-get -y install pptpd

cat << EOA > /etc/pptpd.conf
localip 10.10.23.1
remoteip 10.10.23.120-140
debug
EOA

cat << EOF > /etc/ppp/pptpd-options
ms-dns 10.10.23.1
nobsdcomp
noipx
mtu 1490
mru 1490
debug
EOF

cat << EOD > /etc/ppp/chap-secrets
user   *   password   *
EOD

cat << CATS >> /etc/ppp/options
asyncmap 0
auth
crtscts
debug
dump
lock
hide-password
modem
lcp-echo-interval 30
lcp-echo-failure 4
noipx
+mschap-v2
nodefaultroute
CATS

/bin/systemctl restart pptpd.service

cat << EOH > /etc/sysctl.d/10-forwarding.conf
net.ipv4.ip_forward=1
EOH

sysctl -p

echo "*.debug                         -/var/log/debug.log" >>  /etc/rsyslog.d/50-default.conf

/bin/systemctl restart rsyslog.service

IP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)

# /sbin/iptables -t nat -A POSTROUTING -s 10.10.23.0/24 -j SNAT --to-source ${IP}
# /sbin/iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ${IP}
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# /sbin/iptables -t nat -A FORWARD -s 0.0.0.0/0 -j ACCEPT