Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 2nd December 2011, 17:31
blocker blocker is offline
Senior Member
Join Date: Mar 2008
Posts: 178
Thanks: 9
Thanked 4 Times in 4 Posts
Default Linux multiple IP's on virtual interfaces


here is the scenario: I have a box with 3 IP adresses, configured as virtual interfaces eth0 eth0:0 eth0:1

i have also apache with ip based vhosts:

this one is bound to the IP which is configured on eth0:0

the problem is that when a connection FROM the vhost is made to external host, the connection goes trough eth0 and not trough eth0:0, as i wish to...

whit SNAT i achieved to rewrite the default outgoing IP of the server but that is still not enough, since also in this case i have only one default outgoing IP

iptables -t nat -A POSTROUTING -o eth0 -s -j SNAT --to

this way all the traffic goes trough eth0:0, and the server remains reachable on all 3 IP's

what i want to achieve is, every apache IP based vhost to go out trough its specific IP

any thoughts and help are much appreciated!
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail-Problema jz_ HOWTO-Related Questions 9 14th September 2011 14:31
haresources multiple virtual ips hakkar Server Operation 0 28th September 2010 19:13
Unsupported memory accesses after HowTo Installing Xen On An Ubuntu 8.04 petervanbussel HOWTO-Related Questions 10 20th December 2009 20:46
Problems installing NForce4 sound drivers Wraithfire Installation/Configuration 21 16th April 2006 18:30
KErnel not showing all my memory Jorem Kernel Questions 8 13th April 2006 13:59

All times are GMT +2. The time now is 20:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.