Difference between revisions of "PPTP server"

From ArchWiki
Jump to: navigation, search
m (changes made to /etc/sysctl.conf need to be applied)
(some cleanup)
Line 52: Line 52:
 
Now apply the changes made to sysctl.conf
 
Now apply the changes made to sysctl.conf
  
<pre>
+
# sysctl -p
sysctl -p
+
</pre>
+
  
 
Configure your iptables settings to enable access for PPTP Clients
 
Configure your iptables settings to enable access for PPTP Clients
Line 71: Line 69:
 
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
 
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
 
iptables -A POSTROUTING -t nat -o ppp+ -j MASQUERADE
 
iptables -A POSTROUTING -t nat -o ppp+ -j MASQUERADE
 
 
</pre>
 
</pre>
  
 
Now save the new iptables rules with:
 
Now save the new iptables rules with:
  
<pre>
+
# rc.d save iptables
/etc/rc.d/iptables save
+
</pre>
+
  
 
Read [[Iptables]] for more information.
 
Read [[Iptables]] for more information.
Line 84: Line 79:
 
Now you can start your PPTP Server by this command and enjoy
 
Now you can start your PPTP Server by this command and enjoy
  
<pre>
+
# rc.d start pptpd
/etc/rc.d/pptpd start
+
</pre>
+
  
 
'''You can use [http://dl.dropbox.com/u/17412056/pptpd.sh this script] to auto install pptpd server '''
 
'''You can use [http://dl.dropbox.com/u/17412056/pptpd.sh this script] to auto install pptpd server '''

Revision as of 04:45, 24 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

The Point-to-Point Tunneling Protocol (PPTP) is a method for implementing virtual private networks. PPTP uses a control channel over TCP and a GRE tunnel operating to encapsulate PPP packets.

This entry will show you on how to create a PPTP server in Arch.

We installed pptpd with :

pacman  -S pptpd 

Now, edit the file /etc/pptpd.conf

option /etc/ppp/pptpd-options
localip 172.16.36.1
remoteip 172.16.36.2-254

Now, edit the file /etc/ppp/pptpd-options


name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4

Now we must add my users & passwords in "/etc/ppp/chap-secrets"

<username>     pptpd     <password>   *

Now, enable IP Forwarding by editing "/etc/sysctl.conf"

net.ipv4.ip_forward=1

Now apply the changes made to sysctl.conf

# sysctl -p

Configure your iptables settings to enable access for PPTP Clients

iptables -A INPUT -i ppp+ -j ACCEPT
iptables -A OUTPUT -o ppp+ -j ACCEPT

iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -p 47 -j ACCEPT
iptables -A OUTPUT -p 47 -j ACCEPT

iptables -F FORWARD
iptables -A FORWARD -j ACCEPT

iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
iptables -A POSTROUTING -t nat -o ppp+ -j MASQUERADE

Now save the new iptables rules with:

# rc.d save iptables

Read Iptables for more information.

Now you can start your PPTP Server by this command and enjoy

# rc.d start pptpd

You can use this script to auto install pptpd server