-1

I hire host which locate Tokyo as my vps server, and I follow this article to install pptp server

article about install pptp from digital ocean

and my vps ip >>> 107.191.60.187

in addtion, I install ufw and allow pptpd's port by this way

ufw allow 1723
ufw disable && ufw enable

but in fact I can't access internet resource even if I could successfully connect my pptpd program on vps.

I really don't know how to solve it : (

could anybody help me ..

thanks a lot.

L.Jovi
  • 1,631
  • 4
  • 22
  • 36

1 Answers1

0

just take commit for this question

before I make a mistake that set wrong iptabes rules, and then I resolve it by below method, it works.

#1. first I inspect status and remove ipesec server, it conflicts.
sudo service ipsec status
sudo apt remove ipsec xl2tpd

#2. then I look for port 1723 that judge whether it recive data package
sudo tcpdump -i eth0 port 1723

#3. finally I change rules by using iptabes clearly
sudo iptables -t nat -nL
sudo iptables -t nat -A POSTROUTING -j MASQUERADE

#4. and save it
sudo iptables -t nat -S
sudo iptables-save -t nat

#5. modify content in file before.rules, confirm it as a daemon
sudo vi /etc/ufw/before.rules

# just like below this
*nat
:PREROUTING ACCEPT [73:5676]
:INPUT ACCEPT [6:1415]
:OUTPUT ACCEPT [7:431]
:POSTROUTING ACCEPT [0:0]
:DOCKER - [0:0]
-A POSTROUTING -j MASQUERADE
COMMIT

that's all..

L.Jovi
  • 1,631
  • 4
  • 22
  • 36