12. pptpd and winbindd

The section covers how to configure pptpd + winbindd + AD. If you are working on the freeradius configuration, you may skip this section and go to the next one.

Most of the hard work has been done in the previous sections. You are very close to the final stage.

12.1 Enable and Test winbindd

For Fedora 8, start samba and winbindd with the "service" command.

>     [root@pptp ~]# service smb start
>     Starting SMB services: [  OK  ]
>     [root@pptp ~]# service nmb start
>     Starting NMB services: [  OK  ]
>     [root@pptp ~]# service winbind start
>     Starting Winbind services: [  OK  ]

For older version of Fedora, the "service smb start" will start both smb and nmb.

>     [root@pptp ~]# service smb start
>     Starting SMB services: [  OK  ]
>     Starting NMB services: [  OK  ]
>     [root@pptp ~]# service winbind start
>     Starting Winbind services: [  OK  ]

Winbind starts and spawns two threads.

>     [root@pptp ~]# ps -ef | grep winbind | grep -v grep
>     root     18762     1  0 15:59 ?        00:00:00 winbindd
>     root     18763 18762  0 15:59 ?        00:00:00 winbindd

Wait a few minutes for winbindd to contact the domain controller. Then we can test if winbindd is working fine. If you see no error messages from the wbinfo command, you are in business.

>     [root@acna-pptp etc]# wbinfo -t
>     checking the trust secret via RPC calls succeeded

>     [root@acna-pptp etc]# wbinfo -u
>     EXAMPLE+Administrator
>     EXAMPLE+Guest
>     EXAMPLE+SUPPORT_388945a0
>     EXAMPLE+DC1$
>     EXAMPLE+krbtgt
>     EXAMPLE+skwok
>     EXAMPLE+ldapuser
>     EXAMPLE+pptpdsvr$

To enable samba, nmb and winbind on bootup, use the chkconfig command.

>     [root@pptp ~]# chkconfig winbind on
>     [root@pptp ~]# chkconfig nmb on
>     [root@pptp ~]# chkconfig smb on

Please note that for older version of Fedora, smb will spawn nmb automatically. But for F8, they are separated.

12.2 Configure pptpd

There are two configuration files for pptpd. The first one is /etc/pptpd.conf. You can very much keep it as it is except the ip address range for the ppp connections. Edit the file and add two lines at the bottom to specify the local ip address and the ip address pool for the remote connections.

>     localip 10.0.0.10
>     remoteip 10.0.0.101-200

10.0.0.10 is the ip address of the internal network card eth0. The remoteip is the address pool for the remote connections. If you are running FC6 or above, please refer to Section 8.2 for details on the logwtmp option.

Please note that pptpd by default has a 100 connections limit. You can override it by the "connections" parameter in the pptp.conf file. Read the remarks in the file.

The second configuration file is /etc/ppp/options.pptpd. I stripped off all remarks from my options.pptpd and it is like this:

>     name pptpd
>     refuse-pap
>     refuse-chap
>     refuse-mschap
>     require-mschap-v2
>     require-mppe-128
>     ms-dns 10.0.0.1
>     ms-wins 10.0.0.1
>     proxyarp
>     lock
>     nobsdcomp
>     novj
>     novjccomp
>     nologfd
>     auth
>     nodefaultroute
>     plugin winbind.so
>     ntlm_auth-helper "/usr/bin/ntlm_auth --helper-protocol=ntlm-server-1"

If you have Windows XP clients, you may want to reduce the MTU size. Add the line, /sbin/ifconfig $1 mtu 1400, to /etc/ppp/ip-up as shown in the following list.

>     [root@pptp ppp]# cat ip-up
>     #!/bin/bash
>     # This file should not be modified -- make local changes to
>     # /etc/ppp/ip-up.local instead

>     PATH=/sbin:/usr/sbin:/bin:/usr/bin
>     export PATH

>     LOGDEVICE=$6
>     REALDEVICE=$1

>     [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE}

>     /etc/ppp/ip-up.ipv6to4 ${LOGDEVICE}

>     [ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"

>     /sbin/ifconfig $1 mtu 1400
>     exit 0

The above example reduces the MTU size to 1400. In my environment, I found that XP will connect the VPN and ping all servers without problems, however, it cannot connect to the Microsoft Exchange server properly. Reduce the MTU size to 1400 fixed the problem.

After fixing the files, we can start pptpd and connect to it from remote client. To start it:

>     [root@pptp ~]# chkconfig pptpd on

>     [root@pptp ~]# service pptpd start
>     Starting pptpd: [  OK  ]

11.3 PPTP Access Control

The above configuration allows everyone with a valid userID in the AD to connect to the pptpd server. If you want to restrict access to a group of users, you can create a group, say VPN_Allowed, in the AD. Add users to the group and modify the ntml_auth-helper line in the /etc/ppp/options.pptpd:

>     ntlm_auth-helper "/usr/bin/ntlm_auth --helper-protocol=ntlm-server-1 --require-membership-of=EXAMPLE+VPN-Allowed"

That's all on the server side. If winbind works for you, you can proceed to configure the client. The client PCs require special configurations and is discussed in here.

Next Previous Content