Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set up a VPN server with pptpd, and I'm having trouble determining what range of IP addresses I should pass to it's remoteip configuration option. I can connect just fine to the VPN, but when I try to use the connection to make requests, it does not resolve.

Here's my pptpd.conf file:

###############################################################################
# $Id$
#
# Sample Poptop configuration file /etc/pptpd.conf
#
# Changes are effective when pptpd is restarted.
###############################################################################

# TAG: ppp
# Path to the pppd program, default '/usr/sbin/pppd' on Linux
#
#ppp /usr/sbin/pppd

# TAG: option
# Specifies the location of the PPP options file.
# By default PPP looks in '/etc/ppp/options'
#
option /etc/ppp/pptpd-options

# TAG: debug
# Turns on (more) debugging to syslog
#
debug

# TAG: stimeout
# Specifies timeout (in seconds) on starting ctrl connection
#
# stimeout 10

# TAG: noipparam
#       Suppress the passing of the client's IP address to PPP, which is
#       done by default otherwise.
#
#noipparam

# TAG: logwtmp
# Use wtmp(5) to record client connections and disconnections.
#
logwtmp

# TAG: bcrelay <if>
# Turns on broadcast relay to clients from interface <if>
#
#bcrelay eth1

# TAG: localip
# TAG: remoteip
# Specifies the local and remote IP address ranges.
#
#       Any addresses work as long as the local machine takes care of the
#       routing.  But if you want to use MS-Windows networking, you should
#       use IP addresses out of the LAN address space and use the proxyarp
#       option in the pppd options file, or run bcrelay.
#
# You can specify single IP addresses seperated by commas or you can
# specify ranges, or both. For example:
#
#   192.168.0.234,192.168.0.245-249,192.168.0.254
#
# IMPORTANT RESTRICTIONS:
#
# 1. No spaces are permitted between commas or within addresses.
#
# 2. If you give more IP addresses than MAX_CONNECTIONS, it will
#    start at the beginning of the list and go until it gets 
#    MAX_CONNECTIONS IPs. Others will be ignored.
#
# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
#    you must type 234-238 if you mean this.
#
# 4. If you give a single localIP, that's ok - all local IPs will
#    be set to the given one. You MUST still give at least one remote
#    IP for each simultaneous client.
#
# (Recommended)
localip 192.168.0.1
remoteip 192.168.0.170-180,192.168.0.245
# or
#localip 192.168.0.234-238,192.168.0.245
#remoteip 192.168.1.234-238,192.168.1.245


# Use Google's DNS
ms-dns 8.8.8.8
ms-dns 8.8.4.4

I tried to follow this tutorial.

When I connect to the VPN, and then try to ping, I get the following:

$ ping google.com
ping: cannot resolve google.com: Unknown host
share|improve this question
    
Do an ifconfig on the server and find out what interface the Internet is facing. –  David Aug 22 '13 at 23:30

2 Answers 2

First off, I suggest you drop PPTP as it is provably insecure and should not be relied upon for privacy, replace it with either OpenVPN or IPsec depending on the network environment/restrictions of the client systems.

Understanding this, if you wish to continue with PPTP:

Try ping 8.8.8.8 to rule out a dns issue.

If that doesn't work (and if you're forwarding all traffic through the VPN, which is a client option), you probably don't have IPv4 Forwarding enabled in your pptp server's linux(I'm assuming here) kernel.

To do so immediately:

# sysctl -w net.ipv4.ip_forward=1

Then to make that configuration permanent edit /etc/sysctl.conf and find the section referencing net.ipv4.ip_forward and un-comment(remove # at start of line) it.

If you have any firewall rules check that they allow for masqueraded/NAT traffic.

share|improve this answer
    
I ran this: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE, but when I try and see the rules (iptables -L), it is still blank. –  Ethan Turkeltaub Aug 22 '13 at 21:58
    
The command isn't the problem, it could be something else like not being root, not having the packetfilter built into your kernel, or restarting the iptables service without saving the rules. Are there any errors when you run the command? –  Aaron Tate Aug 23 '13 at 0:51

The pptpd package for Ubuntu only support i386 architecture – I was using a x86 version of Ubuntu.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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