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

canadian pharmacy for viagra emxeergv

buy viagra online canada pharmacy cialis at canadian pharmacy best online pharmacies canada pharmacies viagra canada online pharmacy
cialis canadian pharmacies canada online pharmacies pharmaceuticals from canada canadian pharmacy and cialis cialis canadian pharmacy
pharmaceuticals from canada cialis- canadian pharmacy cialis at canadian pharmacy pharmacy rx one cialis online pharmacy

order uk clomid online

energy repair constitutional symptoms gi and disposition behavior to minimize. order clomid price In place of Bathtub Aimovig.

overseas pharmacy yckphavs

best canadian pharcharmy online internet pharmacy cheap viagra online canada pharmacy viagra online pharmacy cheap cialis online canada pharmacy
wwwcanadianpharmacy.com canadian viagra online pharmacy canadian pharmacy reviews canadadrugpharmacy.com cialis from canadian pharmacy
pharmacy rx one 60 mg cialis canadian pharmacy for cialis cialis from usa pharmacy canadian-pharmacy-online india pharmacy

b66fxpb b269gq

Great forum posts. Many thanks!
brand levitra generic canada online pharmacies

osu cialis generico barato

cost of cialis at cvs pharmacy

[url=https://cialisnowup.com/]cialis black or gold[/url]
try it buy cialis super active

vente de cialisfor

cheap cialis super active

prezzo di cialis

[url=https://cialisnowup.com/]american pharmacy cialis[/url]
buy cialis

discount genuine cialis

farmacia viagra preci

383131 quando esce il cialis generico

https://genericialis20up.com/ follow link wwwcialiscom

https://itcialis20.com/

only now online cialis

cialis price australia

https://cialisnowup.com/ - cheap cialis
staxyn vs cialis dosage

pays cialis vente libre

wirkung von cialis 20mg

cialis funziona costo

https://cialisnowup.com/ - cialis online pharmacy us
buy generic cialis

cialis costa rica

cialis 10mg kosten

viagra strips kaufen

http://viagrauyr.com/ - canadian viagra

viagra canadaviagra 100 mg

http://viagrayqdd.com/ - viagra cheap

canadian viagrachinese viagra black tablets

https://viatrustedonline.com/ - buy generic viagra

online viagrawas kosten 4 viagra 50mg

http://vigraweuy.com/ - viagra coupon

generic viagra

onlineshop fr cialis

achat de cialis foru

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

cialis online offert

genetique viagra online sale

a75631 click now cialis for females

https://cialishowmuch.com/ click now get cialis in canada

http://cialisooie.com/

cialis everyday coupon

c82831 candian pharmacies viagra

http://viagrauyr.com/ viagra tablet all mg

http://viagrayqdd.com/ ligne gnrique de viagra

https://viatrustedonline.com/

we use it buy cialis canada

link for you buy 5 mg cialis

https://cialisnowup.com/ - cheap cialis
generic cialis

pastilla de cialis lilly uk

k64uslm x897wh

Thanks a lot, Quite a lot of forum posts!
detrol without a doctor prescription online pharmacy india

cialis medicament prix

mastercard para comprar cialis

[url=https://cialisnowup.com/]buy female cialis mg online[/url]
cialis rhode island

cialis cheapest online prices

buy viagra online discreetly

sito sicuro viagra online

http://viagraeuw.com/ - cheap viagra

generic viagra

viagra pens for sale

achetez viagra australie

http://viagraeuw.com/ - viagra online

generic viagra

wow cost of cialis

cialis online pay paypal

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

cialis funziona costo

le prix de marque cialis

cialis tabletas bolivia

https://cialisnowup.com/ - buy cialis
prix cialis belgique pharmacie

mastercard cialis orders

z29notf j61civ

Fine content. Cheers. generic chloromycetin reputable canadian mail order pharmacies

h699auu t37vsr

You said it very well.!
combivent canadian pharmacy canada online pharmacy

thttcime

xxpxuymp

e676pd6 x88qyg

Thank you! Ample information!
casodex canadian pharmacy online canadian pharmacy

wtdzopoj

e85edl2 x50vph

You actually mentioned that superbly. buy leukeran pharmacy prices

indian pharma rurpdeqf

canadian pharmacies without a prescription canadian pharmacy cialis 20mg canadian-pharmacy-online canadian pharmacy online cialis at canadian pharmacies
the canada pharmacy canadian pharmaceuticals us pharmacy cialis viagra india pharmacy discount canadian pharmacies
cheap cialis online canada pharmacy cvs pharmacy canadian pharmacies without a prescription canadian pharmacies shipping to usa cialis-canadian pharmacy

generic viagra 200

viagra prise en charge

https://viagrahuupup.com/ - i used viagra for fun
viagra commander ligne

vente de viagra en inde

women viagra

can i buy viagra without a prescription canadian pharmacies best viagra prices brand viagra overnight delivery viagra samples from pfizer viagra brand at low price cheap ed meds online ed medicines generic for erectile dysfunction ed medications best ed medication what are the best generic ed drugs online erectile dysfunction medications ed medications compared cheap ed medication ed medications online ed drugs online best erectile dysfunction medication in canada ed drugs meds for ed erectile dysfunction medications sold in canada erectile dysfunction drugs generic ed drugs cheap erectile dysfunction drugs-canada canadian erectile dysfunction drugs ED medication order erectile dysfunction medication generic drugs for erectile dysfunction erectile meds ed drug cost comparison buy erectile dysfunction drugs generic ed medication erectile dysfunction medication prices ed meds on line cheap ed drugs best erectile dysfunction drugs for sale online erectile dysfunction drugs online meds for erectile dysfunction generic ed meds erectile dysfunction drugs canada ed drug best ed drug best deal on ED meds cheap ed meds medication from canada ed erectile dysfunction generic name for ED drugs buy erectile dysfunction drugs online cheap erectile dysfunction medication generic erectile dysfunction medications erectile dysfunction drugs comparison impotence drugs online common drugs for ed generic impotence drugs ed meds cost effective ed drugs canadian erectile dysfunction drugs rosa impex pvt india ltd tadalista vs cialis where to buy amoxicillin 500mg 213

edmmizno

cialis canada pharmacy mdhrchv

cialis pharmacy rx one cialis coupon for pharmacy universal pharmacy usa pharmacy online
canadian discount pharmacies canada pharmacy online best online canadian pharmacies best online pharmacies
online pharmacies in canada canadian online pharmacy viagra viagra canadian pharmacy canadian pharmacy cialis

mbmnfwuc

j90cxjl z37sug

Superb stuff. Cheers! canadian online pharmacies international pharmacies that ship to the usa

canadian pharmacies viagra joycqmzu

online canadian pharcharmy canadian pharcharmy online reviews cialis on canadian pharmacy online canadian pharmacies best online pharmacies
canadian pharmacy and viagra cialis at canadian pharmacy canadian pharmacies shipping to usa northwestpharmacy.com scam wwwcanadianpharmacy.com
canadian pharmacies viagra online pharmacy viagra online pharmacy medications costco pharmacy canada drug pharmacy

b50igho b372jr

Cheers! Awesome information! list of legitimate canadian pharmacies online drugstore

b826bn2 k47uic

You actually suggested it fantastically. online pharmacies publix pharmacy online ordering

hjkvwwvw

venta de viagra oest

411631 female cialis delivery uk

http://cialishhqoeur.com/ cialis canada pharmacy 5mg

https://cialishowmuch.com/ cialis mexico over counter

http://cialisooie.com/