Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have set up a VPN on a VPS Server using PPTP. I have one NIC with two aliases.

  • eth0
  • eth0:1
  • eth0:2

The 3 interfaces have public addresses. eth0 is a French IP, eth0:1 is UK, and eth0:2 is American.

I have tried configuring IP forwarding and IPtables, but the users traffic is always routed to eth0.

When I set up a user to use eth0:1 to use the UK IP, the user was able to connect but there is no traffic.

I want to be able to assign a user to an interface that they might use to access a specific service.

share|improve this question

1 Answer 1

eth0:1, eth0:2 are interface aliases. They do not function as individual interface. The actual interface is still eth0. Traffic going in and out of those aliases are still count as eth0's.

You will get a better idea if you use iftop to monitor those interfaces one by one.

iftop -BPn -i eth0
iftop -BPn -i eth0:1
iftop -BPn -i eth0:2

All 3 commands will show the same traffic.

If you want to limit service access via iptables, you can try limiting them by destination IPs. Or have services bind to specific IP(s) only.

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.