PPTPD.CONF(5)
π PPTPD.CONF π
okay bestie, welcome to pptpd.conf(5) β the file formats manual page for the PPTP VPN daemon configuration, and yes it's giving "I run a VPN for my friends" main character energy β¨
πΈ NAME πΈ
pptpd.conf β PPTP VPN daemon configuration π¦
β¨ DESCRIPTION β¨
so basically pptpd(8) reads its options from this file, and it's usually living at /etc/pptpd.conf. most options can be overridden by the command line, iykyk π
but here's the tea: the local and remote IP addresses for clients must come from the configuration file or from pppd(8) configuration files. you can't just yell them at the command line, bestie. no cap.
π OPTIONS π
optionoption-file β the name of an option file to hand over topppd(8)in place of the default/etc/ppp/options, so you can sneak PPTP specific options in there π. Equivalent to the command line--optionoption.stimeoutseconds β how many seconds to wait for a PPTP packet before forking thepptpctrl(8)program to handle the client. The default is10seconds. This is a denial of service protection feature π‘οΈ (protect the server, she's sensitive). Equivalent to the command line--stimeoutoption.logwtmpβ updatewtmp(5)as users connect and disconnect. Seewtmp(1). she keeps receipts πdebugβ turns on debugging mode, sending debugging information tosyslog(3). Has no effect onpppd(8)debugging. Equivalent to the command line--debugoption. πbcrelayinternal-interface β turns on broadcast relay mode, sending all broadcasts received on the server's internal interface to the clients π‘. Equivalent to the command line--bcrelayoption.connectionsn β limits the number of client connections that may be accepted. If pptpd is allocating IP addresses (e.g.delegateis not used) then the number of connections is also limited by theremoteipoption. The default is100. β¨delegateβ delegates the allocation of client IP addresses topppd(8). Without this option, which is the default, pptpd manages the list of IP addresses for clients and passes the next free address to pppd. With this option, pptpd does not pass an address, and so pppd may use radius or chap-secrets to allocate an address π«Άlocalipip-specification β one or many IP addresses to be used at the local end of the tunnelled PPP links between the server and the client. If one address only is given, this address is used for all clients. Otherwise, one address per client must be given, and if there are no free addresses then any new clients will be refused π.localipwill be ignored if thedelegateoption is used.remoteipip-specification β a list of IP addresses to assign to remote PPTP clients. Each connected client must have a different address, so there must be at least as many addresses as you have simultaneous clients, and preferably some spare, since you cannot change this list without restarting pptpd. A warning will be sent tosyslog(3)when the IP address pool is exhausted.remoteipwill be ignored if thedelegateoption is used. π₯noipparamβ by default, the original client IP address is given to ip-up scripts using thepppd(8)optionipparam. Thenoipparamoption prevents this π. Equivalent to the command line--noipparamoption.listenip-address β the local interface IP address to listen on for incoming PPTP connections (TCP port1723). Equivalent to the command line--listenoption. π§vrfvrf-name β VRF to use for the TCP listening socket as well as the GRE packets. Equivalent to the command line--vrfoption. πpidfilepid-file β specifies an alternate location to store the process ID file (default/var/run/pptpd.pid). Equivalent to the command line--pidfileoption. πspeedspeed β specifies a speed (in bits per second) to pass to the PPP daemon as the interface speed for the tty/pty pair. This is ignored by some PPP daemons, such as Linux'spppd(8). The default is115200bytes per second, which some implementations interpret as meaning "no limit". Equivalent to the command line--speedoption. ποΈ
π§ NOTES π§
An ip-specification above (for the localip and remoteip tags) may be:
- a list of IP addresses (for example
192.168.0.2,192.168.0.3) π - a range (for example
192.168.0.1-254or192.168.0-255.2) β - or some combination (for example
192.168.0.2,192.168.0.5-8) β¨
For some valid pairs might be (depending on use of the VPN):
localip 192.168.0.1
remoteip 192.168.0.2-254
or
localip 192.168.1.2-254
remoteip 192.168.0.2-254
π ROUTING CHECKLIST - PROXYARP π
- Allocate a section of your LAN addresses for use by clients. π
- In
/etc/ppp/options.pptpdset theproxyarpoption. Inpptpd.confdo not setlocalipoption, but setremoteipto the allocated address range. Enable kernel forwarding of packets, (e.g. using/proc/sys/net/ipv4/ip_forward). π - The server will advertise the clients to the LAN using ARP, providing it's own ethernet address.
bcrelay(8)should not be required. π¦
πΈ ROUTING CHECKLIST - FORWARDING πΈ
- Allocate a subnet for the clients that is routable from your LAN, but is not part of your LAN. π
- In
pptpd.confsetlocalipto a single address or range in the allocated subnet, setremoteipto a range in the allocated subnet. Enable kernel forwarding of packets, (e.g. using/proc/sys/net/ipv4/ip_forward). The LAN must have a route to the clients using the server as gateway. π«Ά - The server will forward the packets unchanged between the clients and the LAN.
bcrelay(8)will be required to support broadcast protocols such as NETBIOS. π‘
π ROUTING CHECKLIST - MASQUERADE π
- Allocate a subnet for the clients that is not routable from your LAN, and not otherwise routable from the server (e.g.
10.0.0.0/24). β¨ - Set
localipto a single address in the subnet (e.g.10.0.0.1), setremoteipto a range for the rest of the subnet, (e.g.10.0.0.2-200). Enable kernel forwarding of packets, (e.g. using/proc/sys/net/ipv4/ip_forward). Enable masquerading on eth0 (e.g.iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE). π - The server will translate the packets between the clients and the LAN. The clients will appear to the LAN as having the address corresponding to the server. The LAN need not have an explicit route to the clients.
bcrelay(8)will be required to support broadcast protocols such as NETBIOS. π₯
π₯ FIREWALL RULES π₯
pptpd(8) accepts control connections on TCP port 1723, and then uses GRE (protocol 47) to exchange data packets. Add these rules to your iptables(8) configuration, or use them as the basis for your own rules:
iptables --append INPUT --protocol 47 --jump ACCEPT
iptables --append INPUT --protocol tcp --match tcp \
--destination-port 1723 --jump ACCEPT
bestie. don't forget the GRE one. I know you forgot the GRE one. π
π SEE ALSO π
pppd(8), pptpd(8), pptpd.conf(5). π
okay that's the whole page!! this one is dated 29 December 2005 and it's from the PPTPD.CONF(5) manual β literally iconic, still serving after all these years. go configure your VPN, bestie, you got this π«Άβ¨π
π¦ where this page comes from
- arch rolling: pptpd 1.5.0-1 Β· GPL-2.0-only
- debian bookworm: pptpd 1.4.0-12+b2 Β· GPL-2.0-or-later
- debian trixie: pptpd 1.5.0-1+b2 Β· GPL-2.0-or-later
- fedora 43: pptpd 1.5.0-6.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 44: pptpd 1.5.0-7.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- nixos 26.05: pptpd 1.5.0
- nixpkgs unstable: pptpd 1.5.0
- ubuntu jammy: pptpd 1.4.0-12build2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms