Pptp: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
(Moved to PPPTP (Poptop))
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==(Poptop) pptpd Server Setup==

Here's what I did to get Poptop pptpd (1.3.4) running on my Slackware (13.37) box.
1) Install the official Slackware ppp package using pkgtool or slackpkg.
2) Install the ppptpd package from Slackbuilds.org using sbopkg.
***NOTE: The package name is NOT Poptop, it's pptpd***
3) Edit /etc/pptpd.conf
option /etc/ppp/options.pptpd -> option /etc/ppp/options
4) Edit /etc/ppp/options
HERE IS A GOTCHA- The official Slackware ppp package (at the time of this writing) contains an error in the options
file. The pppd binary was compiled to look for the new ms-dns parameter but the option file has the old dns-addr
# dns-addr -> ms-dns (or whatever your dns server is)
5) Edit the /etc/ppp/chap-secrets file.
For some reason, the default Slackware package has 4 example entries in it that are not commented (jacco,*,sam,*)
delete these.  You don't want jacco or sam to have a free connection into your box...
ADD: one entry for each user you want to allow access.
Format is: CLIENT [tab] SERVER [tab] PASSWORD [tab] IP ADDRESS
Mine looks like this:
bob * "BobsPasswordIsStrong" *
sue * "FluffyBunnies92" *
6) Finally to start pptpd, n0rmally you would just execute 'pptpd &' but being that I'm a good Slacker, I wrote an
rc.pptpd script.
Create /etc/rc.d/rc.pptpd
# /etc/rc.d/rc.pptpd
# Start/stop/restart the pptpd server.
# To make PopTop start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.pptpd
pptpd_start() {
  if [ -x /usr/sbin/pptpd ]; then
    echo "Starting PopTop pptpd:  /usr/sbin/pptpd server.conf"
    /usr/sbin/pptpd &
pptpd_stop() {
  killall pptpd
pptpd_restart() {
  sleep 2
case "$1" in
  # Default is "start", for backwards compatibility with previous
  # Slackware versions.  This may change to a 'usage' error someday.
7) Make it executable (and autobootable on start up)
chmod 755 /etc/rc.d/rc.pptpd
To start it manually- /etc/rc.d/rc.pptpd start
To be useful you next need to configure your firewall to forward and masquerade traffic from the vpn out to
the world...
8) Edit/create: /etc/rc.d/rc.firewall
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i ppp+ -j ACCEPT
iptables -A FORWARD -o ppp+ -j ACCEPT
iptables -A FORWARD -j ACCEPT
iptables -t nat -A POSTROUTING -s -o ppp+ -j MASQUERADE
9) Make it executable
chmod 755 /etc/rc.d/rc.firewall
10) Flush the old firewall rules (forgetting to do this caused me all sorts of grief (Thanks mancha))
iptables -f
11) Execute the new firewall rules
If you and I haven't made any mistakes, you should now have pptp (server) and router working on your box.
==pptp Client Setup==
Needs to be added.

Latest revision as of 14:38, 30 August 2012