I have a pptp server on ubuntu behind a router. From inside the network I can connect to pptp server, but from the internet I can not.

1723, 1792 port are forwarded in router.

Here is a full log:



Q. GRE: read(fd=5,buffer=804d720,len=8196) from PTY failed: status = -1 error = Input/output error

A. The log will display something like this:

Jun 22 21:48:35 linuxbox pptpd[1900]: GRE: read(fd=5,buffer=804d720,len=8196) from PTY failed: status = -1 error = Input/output error Jun 22 21:48:35 linuxbox pptpd[1900]: CTRL: PTY read or GRE write failed (pty,gre)=(5,6)

An EIO on read from the PTY is caused when pppd has failed and closed the PTY. pppd failed for some reason. pptpd does not report why pppd failed. pptpd not reporting why pppd failed is a bug, but it is not yet fixed. You should look at why pppd failed, which is most likely your fault, not a bug. pppd fails when it does not understand the options you entered, or when it could not negotiate with the peer. Running pppd manually against your options.pptpd file would find bad options. Adding "debug dump" to options.pptpd file will capture cause of negotiation failure.


For PPTP to work you need to open more than port 1723, make sure that you have open in your router

  • Port 1723 (both TCP and UDP)
  • Protocol GRE (protocol number 47)

Protocol GRE has no port numbers so if your router supports so just having proto 47 forwarded should be good


I had to add these ports on my machine in order to get it to work:

sudo firewall-cmd --add-port=1723/tcp --permanent
sudo firewall-cmd --add-port=1687/tcp --permanent
sudo firewall-cmd --reload

Also, my vpn server is windows, so I had to change the settings like below:

enter image description here

  • Warning: PPTP is not secure. Anyone in your network path can trivially break it and read all of your traffic. If this is important to you, use a different VPN technology. – Michael Hampton Apr 7 '19 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.