Shared hosting server + NAT + virtualhosts reachability

PDF versionSend to friendPrinter-friendly version

How to make virtualhosts visible to each other on a shared hosting server behind a Firewall.

Situation

You have a web hosting server with lots of virtual hosts running on it.
You also have a a firewall in front of the server.
The server has a private IP address assigned to the NIC of the server and the firewall provide a NAT (public_ip -> private_ip)

Problem

Some virtualhosts on the server need to connect to the public DNS name of a virtualhost on the same server.
The DNS resolution resolve the DNS name to the public IP of the server and according to the routing table the traffic is routed to the firewall that make the connection impossible for a "in-out-interface-problem".

Solution

I think that there are more than one solution:

  1. alias the public ip
  2. nat in OUTPUT chain

I prefer the iptables solution and this worked for me:

ETH0_IP=$(ifconfig eth0 | grep "inet addr" | awk '{print $2}' | awk 'BEGIN {FS=":"} {print $2}')
ETH0_IP_PUBLIC="YOUR.PUBLIC.IP.ADDRESS"
$IPTABLES -t nat -A OUTPUT -d $ETH0_IP_PUBLIC -j DNAT --to-destination $ETH0_IP

does cialis get old

generic cialis called

[url=https://cialisnowup.com/]link for you cialis dose[/url]
i recommend cialis from canada

my experience with cialis

cialis 5 mg work 4 to 5 days

what is order cialis soft tabs

[url=https://cialisnowup.com/]buy generic cialis[/url]
cheap cialis online

vendita online di cialis

cialis and blindness

visit web site buy cialis pill

https://cialisnowup.com/ - cialis
cialis guaranteed overnight

where to get cialis online

j28nmrr m439vx

You actually stated it superbly. ventolin pills sale pharmacies

cialis sweden buy

cialis pills discussion

[url=https://cialisnowup.com/]we choice herbal cialis[/url]
buy generic cialis

reviews with cialis

p744vgv q53yqg

Very good stuff. With thanks. symbicort without a doctor prescription buy medication without an rx

d38tar0 l79img

Kudos, I enjoy this! generic crestor prescription drug

cialis 80mg online

ab5821 need cialis

[url=https://cialisdoitnow.com/]cialis[/url]

cialis homme

[url=http://cialishhqoeur.com/]cialis[/url]

good choice online cialis

[url=https://cialishowmuch.com/]buy cialis online[/url]

how did ilona staller not get aids Ucoz Model 5.9.8

health and human services department http://cialiswalmart5.com cialis from walmart
if spammers wrote cialis commercials cialis generic general practice physician

we choice cialis in india

online video specialists

https://cialisnowup.com/ - comprar cialis en valenci
online cialis

my experience with cialis

p22kaod m38vez

You've made your point.
depakote online canada online pharmacy

canadian cialis online pharmacy idbaxym

canadian pharmacy viagra viagra pharmacy canadian government approved pharmacies canadian pharmacy cialis
viagra pharmacy canadian pharcharmy online viagra online pharmacy medications best canadian online pharmacy reviews
cialis online pharmacy canadian online pharmacy for viagra tadalafil india pharmacy cvs pharmacy

cheap is soft us at

is is di pfizer

1612 800 for is

1612

order cialis 60 mg online

buy cialis online from india

https://cialisnowup.com/ - cialis pour qu
cialis generics online

cialis andere medikamente

rezeptfrei cialis mannheim

comprar cialis natura

https://cialisnowup.com/ - online cialis
cialis online

fda approved cialis for bph

gsfuzesl

h24lie8 x928uk

Thanks, Excellent information. cialis daily generic walmart pharmacy viagra

ordine cialis online

le prix de marque cialis

https://cialisnowup.com/ - cialis australia meds health
acquisto cialis generic

acquisto cialis in farmaci

enter site levitra vs cialis

dapoxetine and cialis

[url=https://cialisnowup.com/]vente cialis fr[/url]
acheter cialis internet est

rezeptfrei cialis mannheim

cialis overdose results

cialis free samples australia

[url=https://cialisnowup.com/]click now lowest priced cialis[/url]
cheap cialis online

black is cialis

cialis normal

cialis bph dose

[url=https://cialisnowup.com/]cheap cialis online[/url]
cialis

comprar cialis natura

rxrfvzvrto

neqanxxv

generic cialis india online

precios de cialis en india

https://cialisnowup.com/ - cialis baratos pagan paypal
buy cialis

can you order cialis

real lasix without prescription

cheap lasix in New Zealand
where to purchase lasix in New Orleans purchase lasix from Oklahoma
http://lasifurex.com/ where to purchase lasix in Tucson
cheap lasix in Memphis
best price for lasix in Greece
buy water pills lasix
where to buy lasix in New York
where to buy lasix in Czech Republic

w58rpw8 c20zfv

Kudos. Fantastic stuff! buy hytrin canada pharmacies without script

rmvkcuim

free trial cialis coupon

cialis generics online

https://cialisnowup.com/ - where to buy cialis tablet
cialis guaranteed overnight

online video specialists

click here cialis kanada

cialis 20mg england billig

https://cialisnowup.com/ - online cialis
cialis cheap generic 10 mg

osu cialis generico barato

try it cialis for sale in us

levitra gnrique cialis

https://cialisnowup.com/ - cialis a quel age
cialis online

cialis y tension arteria

s19eooz z16wgd

Thanks a lot, Excellent stuff!
sinemet sale canadian pharmacy online

w12ivgn b74lds

Appreciate it! Quite a lot of knowledge.
buy methotrexate online cvs pharmacy online

overnight shipping clomid

rare tableland in substantial burns, which can emerge suddenly and. price clomid 100mg Coronary of trusted online dispensary reviews.

can i buy cialis in phuket

cialis uk supply

[url=https://cialisnowup.com/]only now online cialis[/url]
cialis rhode island

discount genuine cialis

n84gdiv c558wb

Whoa loads of terrific data!
ventolin inhaler canadian pharmacy canadian pharmacies that ship to us

m68bgzs b15vhb

You made your stand extremely nicely!! tentex royal online pharmacy cheap no prescription

viagra in phuket to buy

a75611 look there cialis super active

cheap cialis onlinewo cialis kaufen forum

generic cialis online

wmpycaqm

w18lls4 t84oml

You actually explained that wonderfully!
buy dostinex online mexican pharmacy online

upuyrxfd

pastillas cialis 10 mg

link for you cialis dose

[url=https://cialisnowup.com/]cialis online offert[/url]
black is cialis

reviews with cialis

cialis italiano

cialis in miami

https://cialisnowup.com/ - generic cialis
cialis 30 mg canada

cialis costa rica

xwhdsrmh

h68jvj3 p682cm

Amazing information, Kudos!
proventil online canadian pharmacy

flxtcykv