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

viagra online pharmacy tlwdhhzy

online pharmacies without prescription canada online pharmacy viagra viagra online pharmacy canadian pharmacy cialis 20mg canadian pharmacy - cialis
online canadian pharmacies generic cialis canada pharmacy online canadian pharmacies shipping to usa canadian pharmacy online viagra cheap cialis online canadian pharmacy
pharmacy rx one 60 mg cialis viagra canada pharmacy canadian overnight pharmacy cialis in canadian pharmacies cialis canadian pharmacy

super cialis best price

click here brand name cialis

https://cialisverygoodn.com/ - 5 mg baratos cialis
cheap cialis online

denmark online generic cialis

ftfieunh

prices viagra uk

444021 cialis soft tabs 10 mg

[url=http://cilapharm.com/]cheap cialis online[/url]

collegiate online

[url=https://edpillsnews20.com/]ed pills[/url]

watermellon like viagra effect

[url=https://frviagrafrance.com/]viagra sur internet[/url]

quanto costa mg cialis

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

z33vnae t849gi

Great data, Kudos. northwest pharmacy cvs online pharmacy

cialis buy canada order

cialis eiaculazione precoce

https://cialisverygoodn.com/ - buy cialis online
cialis generico consegna rapid

effectiveness cialis dosage

g95csrk j401xc

This is nicely put. .
aarp approved canadian online pharmacies canadian online pharmacy

ombwkdwh

effetti del cialis

cialis in luxemburg

https://cialisverygoodn.com/ - online cialis
cialis oral jelly

just try buy cialis online uk

cialis diario 5mg c28 comp

costo del viagra in slovenia

[url=https://viagrasupertreat.com/]online viagra[/url]

cheap viagra

acheter cialis pas cher forum

forum cialis ou kamagra

[url=https://cialisverygoodn.com/]cialis ou viagr[/url]
buy cialis online cialis

cialis acheter in hilversum

generic cialis canada pharmacy online zzehnrf

canadian pharmacy for cialis mexican pharmacy viagra online canada pharmacy generic pharmacy india
canada pharmacy cialis cialis coupon for pharmacy online pharmacy without a prescription brand viagra online canada pharmacy
pharmacy rx one 60 mg cialis cialis coupon for pharmacy canadian viagra online pharmacy overseas pharmacy

follow link cialis 100

link for you cialis to order

https://cialisverygoodn.com/ - effectiveness cialis dosage
cheap cialis online

how strong is cialis 20mg

cialis cost aust

53e921 prezzo viagra europa

[url=https://viagratodaybest.com/]generic viagra[/url]

viagra effetti donne

[url=https://viagratodo20.com/]viagra online canadian pharmacy[/url]

cialis kaufen kln

recensioni cialis generico

https://cialisverygoodn.com/ - generic cialis online
billige cialis i europa

cialis online store

cialis drogue

cialis 20 mg cheap online

https://cialisverygoodn.com/ - cialis online foro
cialis georgia

does cialis work for bph

nyzhoxcs

only for you cialis 100mg

getting the most from cialis

https://cialisverygoodn.com/ - generic cialis farmacia
online cialis

french over the counter cialis

cialis online tadalafil

ricetta cialis

https://cialisverygoodn.com/ - cialis generico consegna rapid
buy cialis

cialis y tadalafi

cialis daily pricing australia

cialis generico mastercard

https://cialisverygoodn.com/ - to buy generic cialis
generika cialis kaufen

denmark online generic cialis

cmxheszg

does cialis work for bph

buy cialis in canada online

https://cialisverygoodn.com/ - cheap cialis online
cialis 20 mg euro

dosages du cialis

mejor web para comprar cialis

generic cialis thailand

https://cialisverygoodn.com/ - buy cialis toronto
acheter cialis original 20mg

generic cialis thailand

cialis online foro

mejor precio para cialis

https://cialisverygoodn.com/ - cialis 50 mg precio
cialis 20 mg cheap online

how strong is cialis 20mg

acheter cialis original 20mg

generic cialis one pill

https://cialisverygoodn.com/ - cialis georgia
cialis for sale on line india

billige cialis i europa

viagra vs levitra price

f4d721 cialis fsa

http://cialisuqpor.com/ - cheap cialis

liver cancer specialist uk

http://cialisuqwc.com/ - buy cialis

acheter cialis original 20mg

http://cialisuyew.com/ - cheap cialis

5 mg cialis lasts

buy cialis online cialis

https://cialisverygoodn.com/ - online pharmacy uk cialis soft
wow discount soft cialis

cialis y tadalafi

cialis 50 mg precio

cialis commercial football

https://cialisverygoodn.com/ - cialis 20mg generic cheapers
online cialis

20 mg cialis baratos

cialis ohne rezept schweiz

brand ca overnight cialis

https://cialisverygoodn.com/ - buy generic cialis
cheap cialis

cialis generika preisvergleich

zhdylthe

wow cialis online 50mgs

cialis generic 5mg

https://cialisverygoodn.com/ - buy generic cialis
cialis 20 mg cheap online

french over the counter cialis

cialis 10mg comprim

cialis 20 prix discount

https://cialisverygoodn.com/ - long does cialis 5mg work
mg 10 cost cialis

cialis generika wirkung

cialis generika cipl

cialis buy online in nz

https://cialisverygoodn.com/ - cialis bestellen gnsti
link for you cialis to order

cialis muestras genricas

cialis commercial football

recensioni cialis generico

https://cialisverygoodn.com/ - click here buy cialis pills
how strong is cialis 20mg

cialis 5 mg acquisto

cialis discount coupons

(threefold being generic viagra online druggist's differentiation): Cavity heedful oncology normal cialis dosage If you reserve them after a greatly humourless being it.

cheapcialis

super cialis best price

https://cialisverygoodn.com/ - cialis 20 mg cheap online
traitement cialis 5 mg

cialis professional on line

follow link brand name cialis

generic cialis thailand

https://cialisverygoodn.com/ - cialis online
buy cialis

cialis generic 5mg

cialis 10 stress

we use it cialis online store

https://cialisverygoodn.com/ - buy generic cialis
buy cialis online

cialis 5 mg baratos

we use it cialis online store

cialis denmark

https://cialisverygoodn.com/ - can i purchase cialis in dubai
cialis discounts order on line

cialis femme effe

can you take 40mgs of cialis

acheter cialis soft

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

cialis generique tunisie

viagra online buy india

gnc generic viagra

https://viagiowow.com/ - pharmacie en ligne viagra
buy generic viagra

cost of viagra pill

generic viagra plus priligy

viagra en vente franc

https://viagiowow.com/ - buy generic viagra online
order viagra ideal dosage

how good is 50mg viagra

lasix cost for dogs

how to buy lasix in Japan
how to buy cheap lasix online best way to find cheap lasix in Denver http://lasifurex.com/ where to buy lasix in Phoenix online


lasix tablets foreign
cheap lasix in Indianapolis
where to buy lasix in Ireland
cheap lasix from uk
where to purchase lasix in Sweden
lasix tablets

viagra free trial canada

viagra use in premmies

[url=https://viagiowow.com/]viagra[/url]
buy viagra online

viagra richtig einnehmen

phizer viagra unemployed

pastilla viagra para la mujer

https://viagiowow.com/ - cost of viagra pill
viagra online

no cheap viagra perth

il viagra fa male al cuor

online genetic viagra store

https://viagiowow.com/ - buy viagra online
womens viagra for sale in uk

the best site viagra sample