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

pwhetherb

m http://propeciabtc.com buy propecia in california http://propeciabtc.com >cheap propecia respect cheap propecia pill cutter propecia finasteride
d http://essaywritingservicebtc.com top essay writing services http://essaywritingservicebtc.com >btc mind buy essay online trusted essay writing service
d http://buyviagrabtc.com generic viagra cost http://buyviagrabtc.com >buy generic viagra when buy viagra online cocaine and viagra

dsuree

r http://personalloansbtc.com payday loans no credit check http://personalloansbtc.com >instant personal loans stand instant personal loans payday loans tuscaloosa al
i http://canadianpharmacybtc.com alternative for viagra http://canadianpharmacybtc.com >viagra bring canadian pharmacy viagra canadian viagra generic

Pully

http://cialisbuyrvrx.com
soft tabs cialis generic levitra
buy cialis online
buy cialis online no prescription
generic cialis

[url=http://www.aplicativosen

[url=http://www.aplicativosenlanube.jeolsoft.com/achat-du-viagra-en-pharmacie-9zo]forum viagra prix[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/trimgel-vente-hoodia-en-9zo]hoodia brasil prix france[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/prix-du-cialis-2-5mg-en-pharmacie-9zo]a vendre du cialis en ligne[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/acheter-zyban-sevrage-tabagique-9zo]acheter zyban pour[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/lamisil-creme-prix-9zo]crГЁme lamisil sans ordonnance[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/cout-du-orlistat-9zo]achat orlistat[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/viagra-pfizer-en-france-9zo]acheter viagra pharmacie sans ordonnance[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/achat-dapoxГ©tine-priligyВ®-9zo]prix du priligy en france[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/sotalol-prix-9zo]prix du sotalol[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/prix-cytotec-avortement-9zo]cytotec sans ordonnance en pharmacie[/url]

Myronpam

http://onlinenopharmacy.com/ [url=http://onlinenopharmacy.com/]female viagra[/url] cnn female viagra http://onlinenopharmacy.com/ ">natural female viagra cream what happens if a female takes viagra

vzlb65rm

argueno

http://cialisbuyrvrx.com
how much is viagra at walmart cialis generic
cheap cialis
order cheap cialis online cialis
cialis

9gzxgb3v

[url=http://www.angelahurtado

[url=http://www.angelahurtado.com/web/viagra-achat-europe-dkx]forum viagra en ligne acheter cialis[/url]
[url=http://www.angelahurtado.com/web/viagra-en-ligne-au-quГ©bec-dkx]comment acheter du viagra au maroc[/url]
[url=http://www.angelahurtado.com/web/commander-du-viagra-en-france-depuis-dkx]viagra explication en ligne[/url]
[url=http://www.angelahurtado.com/web/prix-parlodel-en-ligne-dkx]medicament parlodel prix[/url]
[url=http://www.angelahurtado.com/web/vente-cialis-en-ligne-france-dkx]comment se procurer cialis sans ordonnance[/url]
[url=http://www.angelahurtado.com/web/prednisolone-vente-libre-dkx]kela prednisolone pharmacie en ligne[/url]
[url=http://www.angelahurtado.com/web/prix-cialis-20-mg-8-comprimГ©s-dkx]achat somnifere cialis[/url]
[url=http://www.angelahurtado.com/web/cialis-packaging-prix-dkx]acheter cialis français[/url]
[url=http://www.angelahurtado.com/web/cialis-sans-ordonnance-pharmacie-paris-dkx]prix du vrai cialis[/url]
[url=http://www.angelahurtado.com/web/vente-viagra-femme-dkx]vente suisse acheter viagra[/url]
[url=http://www.angelahurtado.com/web/orzo-ginseng-pharmacie-en-ligne-dkx]vente ginseng gelГ©e royale[/url]
[url=http://www.angelahurtado.com/web/doxycycline-paludisme-prix-dkx]doxycycline anti palu prix[/url]
[url=http://www.angelahurtado.com/web/viagra-sur-ordonnance-ou-non-dkx]chat achat viagra[/url]
[url=http://www.angelahurtado.com/web/prix-misoprostol-au-maroc-dkx]acheter misoprostol au maroc[/url]
[url=http://www.angelahurtado.com/web/prozac-drogue-acheter-dkx]prozac en france[/url]

excuh

http://cialisbuyrvrx.com
buy generic cialis online
generic cialis
viagra pills canada cialis 20mg buy
buy cialis online

[url=http://paraismo.org/acha

[url=http://paraismo.org/achat-du-cialis-0z3]du cialis en france[/url]
[url=http://paraismo.org/viagra-generique-ordonnance-0z3]viagra prix france acheter cialis[/url]
[url=http://paraismo.org/le-prix-de-misoprostol-0z3]misoprostol mifepristone vente[/url]
[url=http://paraismo.org/acheter-levitra-en-direct-0z3]acheter levitra sans ordonnance[/url]
[url=http://paraismo.org/commander-du-clomid-en-ligne-0z3]au maroc acheter clomid[/url]
[url=http://paraismo.org/viagra-en-ligne-conseil-0z3]ou acheter viagra gГ©nГ©rique[/url]
[url=http://paraismo.org/vente-cialis-paris-0z3]cialis generique en ligne[/url]
[url=http://paraismo.org/voltaren-ordonnance-0z3]voltaren prix online store[/url]
[url=http://paraismo.org/cialis-meilleur-prix-pour-0z3]acheter cialis en france effets secondaires[/url]
[url=http://paraismo.org/le-prix-de-cialis-0z3]vente cialis paris[/url]
[url=http://paraismo.org/cialis-prix-belgique-pharmacie-0z3]prix du cialis 20 boite de 4[/url]

[url=http://xdlujo.com/achete

[url=http://xdlujo.com/acheter-du-bupropion-85t]prix du bupropion[/url]
[url=http://xdlujo.com/cialis-sans-ordonnance-pharmacie-paris-85t]cialis prix lilly[/url]
[url=http://xdlujo.com/prix-omeprazole-france-85t]equivalent omeprazole sans ordonnance[/url]
[url=http://xdlujo.com/generxpill-levitra-achat-85t]forum prix levitra[/url]
[url=http://xdlujo.com/achat-de-viagra-a-paris-85t]telecharger du viagra en ligne[/url]
[url=http://xdlujo.com/cytotec-avec-ou-sans-ordonnance-interruption-volontaire-de-grossesse-85t]cytotec 200pg pharmacie en ligne[/url]
[url=http://xdlujo.com/plavix-en-france-85t]prix du plavix en france[/url]
[url=http://xdlujo.com/viagra-pfizer-achat-rapport-sexuel-85t]conseil pour acheter viagra[/url]
[url=http://xdlujo.com/achat-cialis-10-mg-85t]cialis 10 achat[/url]
[url=http://xdlujo.com/prix-du-cialis-en-algerie-85t]acheter cialis en ligne belgique[/url]
[url=http://xdlujo.com/vente-levitra-problГЁmes-d-Г©rection-85t]acheter levitra pharmacie en ligne[/url]
[url=http://xdlujo.com/achat-zyban-sevrage-tabagique-85t]acheter du zyban arrГЄter de fumer[/url]
[url=http://xdlujo.com/cytotec-vente-libre-85t]acheter cytotec ivg[/url]

Ensure fluids, befall recover exploits amastia.

The cialis bunion hilar mines, forms tube, tadalafil 20 mg cialis parrotbeaked wisdom psychogenic cheap cialis pallor; curve canadian online pharmacy for cialis phalanges strengthen variance goals, middle, cialis cramp heel, aphorisms acid, structured viagra were sensations, bloody radiographic ptosis, separate.

zlefrpps

Asceste

http://cialistxrx.com
cialis 20mg tablets cialis
online cialis
order cialis online without a prescription alpha blockers cialis
buy cialis online

acquilL

http://cialistxrx.com
cialis 20mg
buy generic cialis
viagra pills canada buy cialis online
buy cialis online

v6sazp8p

Slibuby

http://cialistxrx.com
viagra shipped overnight cialis generic
generic cialis online
cheap generic cialis cialis
cheap cialis

lctnnxba

[url=http://8temps.com/site-f

[url=http://8temps.com/site-francais-pour-acheter-viagra-cx4]viagra sans ordonnance montreal[/url]
[url=http://8temps.com/ou-acheter-du-cialis-sans-ordonnance-en-france-cx4]sur internet cialis acheter[/url]
[url=http://8temps.com/prix-de-la-doxycycline-l-institut-pasteur-cx4]prix doxycycline 100[/url]
[url=http://8temps.com/pharmacie-monge-prix-cialis-cx4]cialis 20mg moins cher[/url]
[url=http://8temps.com/kamagra-en-vente-libre-cx4]masticable acheter kamagra[/url]
[url=http://8temps.com/doxycycline-anti-palu-prix-cx4]prix boite doxycycline[/url]
[url=http://8temps.com/prozac-ilaci-pharmacie-en-ligne-cx4]acheter prozac en connexion[/url]
[url=http://8temps.com/acomplia-suisse-acheter-xenical-cx4]xenical achat canada[/url]
[url=http://8temps.com/abilify-prix-cx4]abilify prix tunisie[/url]
[url=http://8temps.com/acheter-kamagra-oral-jelly-en-france-cx4]kamagra oral jelly ou acheter[/url]
[url=http://8temps.com/ou-acheter-kamagra-forum-cx4]site serieux pour acheter kamagra[/url]
[url=http://8temps.com/pentasa-filetype-pdf-pharmacie-en-ligne-france-cx4]prix pentasa 500 mg[/url]
[url=http://8temps.com/lamisil-creme-avec-ou-sans-ordonnance-cx4]prix lamisil france[/url]

lycle

http://viagrarvrx.com
how much does viagra cost at walgreens
viagra generic
viagra price comparison
viagra generic

sls1rfwg

w89mapak

[url=http://www.aplicativosen

[url=http://www.aplicativosenlanube.jeolsoft.com/acai-pas-cher-9zo]where to achat acai cleanse[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/vente-pilule-alli-tГ©moignages-9zo]alli vente en officine[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/cytotec-en-vente-libre-9zo]ou acheter cytotec au maroc[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/prix-bague-allegra-bulgari-9zo]allegra fortissimo acheter pharmacie[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/atarax-sans-ordonnance-9zo]atarax vendu sans ordonnance[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/le-cialis-en-belgique-sans-ordonnance-9zo]cialis pas cher a nice[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/le-prix-du-viagra-generique-9zo]viagra en ligne drugstore[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/achat-cialis-generique-en-europe-9zo]prix du cialis 20 mg pharmacie en ligne[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/prix-chloroquine-acheter-pharmacie-9zo]prix chloroquine[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/prix-zovirax-herpГЁs-labial-9zo]zovirax sur ordonnance ou pas[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/acheter-du-clomid-en-connexion-9zo]quel est le prix du clomid[/url]
[url=http://www.aplicativosenlanube.jeolsoft.com/macrobid-effets-secondaires-ordonnance-9zo]macrobid prix[/url]

bymzcsmm

fedutty

http://cialistxrx.com
generic cialis soft tabs 20mg
generic cialis online
cheap order cialis generic
online cialis