Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu 10.04 server with PPTPD server. It has one nic with eth0 and eth0:0. eth0:0 has an UK IP and eth0 has a Franch IP. I have setup eth0:0 as default gateway because I want to show that the server has an UK IP address.

The problem is that when I connect to the server using a Mac, the traffic is routed using the eht0 nic.

Is there a way to tell to PPTPD which nic to use to route the internet traffic? Using route -n I get the right routing table:

Destination -> UK-IP

If I access an IP to geolocation web site from the server, it shows the UK IP. Network configuration is:

auto eth0 iface eth0 inet static address netmask broadcast network

auto eth0:0 iface eth0:0 inet static address IP.DE.FAIL.OVER netmask broadcast IP.DE.FAIL.OVER gateway IP.DE.FAIL.OVER

I have used this guide to configure PPTPD:

share|improve this question

Instead of

# PPTP IP forwarding
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


# PPTP IP forwarding
iptables -t nat -A POSTROUTING -o eth0 -d -j MASQUERADE

(where is the UK IP assigned to eth0:0)

share|improve this answer
if I use iptables -t nat -A POSTROUTING -o eth0 -d -j MASQUERADE the client does not have network access. May be the ISP router crates this issue, not sure. – rtacconi Oct 3 '11 at 11:14
Any idea why iptables -t nat -A POSTROUTING -o eth0 -d -j MASQUERADE it is not working? – rtacconi Oct 4 '11 at 11:37

Your Answer


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.