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

grsvrhnknbssbdsjamerbop

viagra https://medyvirgaraonline.com/ - viagra online viagra generic generic viagra viagra online

walmart generic cialis

cialis cialis cialis where to buy
cialis what is in cialis black 800mg CIALIS CIALIS non-prescription cialis
how to buy cialis on line cialis tadalafil 20mg lowest price
what is cialis CIALIS cialis at walmart Cialis cialis generic cialis without a doctor

cheap cialis svrdxMitsFlilecex

cialis http://www.ciallisonline.com/ - п»їcialis cialis cialis online cialis

generic cialis india pharmacy

cialis cialis without doctor prescription in usa cialis prices walgreens cialis CIALIS
cialis cialis daily use cialis manufacturer's website average cost of cialis original cialis CIALIS cialis generic tadalafil
CIALIS Cialis acheter cialis other uses for cialis tadalafil 5mg tab CIALIS

canadian pharcharmy online cialis

cialis Cialis cialis from mexican pharmacy
cialis online for sale CIALIS maker of cialis tadalafil from walmart cialis 10 mgs
generic cialis from usa pharmacy cialis us pharmacy cialis
canadian pharmacy generic cialis cialis Cialis cialis reviews cialis Cialis

online prescriptions without a doctor

buy viagra and cialis online Cialis generic erectafil 5 mg cialis pharmacy online cialis CIALIS
tinnitus from cialis cialis CIALIS Cialis how to make cialis CIALIS cialis
best prices on cialis cialis doses available cheap online cialis Cialis cialis in australia cialis

ngbfhfgMitsFlileoaj

cialis online https://valcialisns.com/ - online cialis buy cialis п»їcialis cialis

Cialis

canadian pharmacy tadalafil do they make a generic cialis Cialis
is a generic cialis available in usa ingredients in cialis cialis who manufactures cialis cialis
canadian drugs sildenafil vs tadalafil over the counter cialis
cialis generic viagra cialis and levitra CIALIS generic cialis from indian cialis no prescription is cialis generic available

cialis svrdxMitsFlileudr

generic cialis http://www.ciallisonline.com/ - cialis generic п»їcialis cialis online online cialis

Cialis

Cialis cialis CIALIS Cialis CIALIS
what is the cost of cialis 20 mg Cialis cialis cialis with a prescription best cialis dosage cialis cialis
should i take cialis every day? cialis CIALIS what is in cialis black 800mg Cialis legal generic tadalafil tablets

nmwgbndsloEurobixgwwkx

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

hwyhnvxojelgbsloHidlyjcirm

viagra online https://zvigariageneric.com/ - cheap viagra cheap viagra online viagra buy viagra

cialis

cialis cialis uses cialis how long does it take tadalafil to work cialis
cialis generic cialis when available usa cialis buy generic cialis, canadian Cialis Cialis cialis
cialis samples Cialis Cialis Cialis has cialis gone generic yet genuine cialis with prescription

Cialis

tadalafil vs sildenafil Cialis Cialis
Cialis tadalafil cost cialis online viagra without prescription CIALIS
viagra vs cialis vs levitra how much dose generic tadalafil prices
cialis from canada pharmacy lowest price cialis cialis goodrx cost of cialis at walmart cialis active ingredient Cialis

jybdhsfezbsfdfegififleconnaredfed

cialis daily http://pharmcilisa.com/ - cheap cialis online cialis generic cialis generic cialis

tadalafil over the counter

cialis Cialis cialis active ingredient?
cialis Cialis generic.cialis.viagra Cialis what's the active ingredient in cialis
Cialis cialis cialis
tadalafil 20mg CIALIS CIALIS cialis side effects of tadalafil cialis

ningrgtrggififleconnaredjrm

online cialis http://genericcialls.com/ - cheap cialis cialis online generic cialis online cialis

jybdhsfezbsfdfegififleconnaredjyz

cialis pills http://pharmcilisa.com/ - generic cialis generic cialis cialis online cialis daily

CIALIS

Cialis Cialis cialis
cialis CIALIS Cialis cialis cialis
generic cialis black 800mg cialis strengths cialis
tadalafil generic, greensboro nc cialis what is cialis professional buy cialis in the usa dosage of cialis and viagra cialis 20 mg walmart price

Cialis

cialis coupons where can i get cialis what is the difference between viagra and cialis
CIALIS cialis best price for tadalafil 20 mg Cialis cialis and high blood pressure
cialis strengths canadian pharcharmy online cialis Cialis
is generic cialis available Cialis cialis enlarged prostate cialis prices at amazon buy cialis over the counter cialis

sgdvjglsjdsadevylw

viagra https://sexviagen.com/ - viagra generic viagra without doctor prescription viagra online viagra

CIALIS

cialis with a prescription cialis mexico can you buy cialis without prescription
cialis Cialis Cialis is cialis generic Cialis
Cialis can you buy cialis without a prescription tadalafil generic at walmart
viagra or cialis Cialis generic.cialis.viagra generic tadalafil 20 mg cialis liquid cialis

grsvrhnknbssbdsjamerbhq

viagra without doctor prescription https://medyvirgaraonline.com/ - viagra viagra without doctor prescription viagra online buy viagra

sgdvjglsjdsadevybu

viagra https://sexviagen.com/ - viagra online viagra without a doctor prescription generic viagra viagra online

how to take cialis for best results

does.generic cialis work cialis tadalafil 20 mg is cialis effective
cialis purchase cialis cialis 20 mg walmart price generic cialis sales in us ? cialis
CIALIS where to buy generic cialis online without prescription cialis
when will generic cialis be available CIALIS generic cialis mexico cialis difference between levitra and cialis Cialis

buy cialis svrdxMitsFlilejch

generic cialis http://www.ciallisonline.com/ - cialis online cheap cialis online cialis online cialis

tadalafil 20 mg.

Cialis cialis cialis online pharmacies
when does the cialis patent expire viagra india pharmacy side effects of tadalafil celias pills cialis
cialis cialis tadalafil walmart
cialis viagra interaction tadalafil cost at walmart Cialis cialis Cialis cialis canada

ngbfhfgMitsFlilesii

п»їcialis https://valcialisns.com/ - cialis online cialis online cialis cheap cialis

lilly cialis

Cialis cialis extra dosage cialis
CIALIS 20 mg cialis cialis cialis Cialis
CIALIS cialis difference between viagra cialis and levitra
cialis and grapefruit can i get cialis without a prescription cialis Cialis cialis for purchase cialis australia

ndyoprgploimmitterikbkvr

viagra https://buyonlinewwwmen.com/ - п»їviagra viagra without doctor prescription generic viagra п»їviagra

cialis prices at amazon

cialis cialis is a generic cialis available in usa
cialis without doctor prescription in usa Cialis generic cialis for sale CIALIS does tadalafil work as well as cialis
cialis tablet cialis purchase cialis cheap
cialis Cialis Cialis cialis CIALIS cialis

bsgsdnhajbeimmitterietezj

buy viagra [url=https://www.genericviragacheap.com/]viagra[/url] generic viagra viagra online viagra online

cialis

canadian pharmacy tadalafil cialis cialis
cialis cialis and sinus congestion cialis cialis viagra-cialis
where to get cialis. cialis buy levitra without a prescription
CIALIS CIALIS cialis coupons printable cialis cialis generic 20 mg price Cialis

hwyhnvxojelgbsloHidlyvirxd

online viagra https://zvigariageneric.com/ - generic viagra viagra viagra online viagra

sgdvjglsjdsadevytz

viagra online https://sexviagen.com/ - viagra generic viagra cheap viagra viagra generic

bsgsdnhajbeimmitteribacjj

viagra https://www.genericviragacheap.com/ - viagra generic generic viagra viagra viagra without a doctor prescription

india pharmacy viagra

ndyoprgploimmittericpenh

online viagra https://buyonlinewwwmen.com/ - viagra online viagra generic viagra viagra generic

ndyoprgploimmitteriudfqk

viagra https://buyonlinewwwmen.com/ - viagra viagra buy viagra viagra

Cialis

cialis cvs cialis Cialis
cialis CIALIS Cialis how to buy cialis without a script cialis
Cialis Cialis canada pharmacy online cialis sales
CIALIS Cialis generic cialis availability date cialis viagra & cialis is cialis generic

clomid online cheap

cialis

how long does it take cialis to take effect female cialis cialis
Cialis Cialis walmart cialis cialis CIALIS
cialis generico tadalafil drug class ed pills online
cialis without doctor prescription in usa cialis cialis cialis cialis prices in canada sex usa

grsvrhnknbssbdsjamerbmr

generic viagra https://medyvirgaraonline.com/ - viagra online viagra viagra generic viagra

Cialis

cialis cvs cialis normal cialis dosage
cialis online pharmacy reviews Cialis cialis where to get cialis in las vegas Cialis
buy cialis generic online super cialis with dapoxetine Cialis
tadalafil canada cialis black Cialis cialis not working cialis cialis for daily use

п»їcialis svrdxMitsFlilepig

online cialis http://www.ciallisonline.com/ - cialis cialis generic buy cialis buy cialis

canadian cialis

apollo pharmacy online online canadian pharcharmy
canada pharmacy online canada pharmaceuticals
pharmacy online cheap https://canadianmpharmacy.com/