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

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/

cialis generic svrdxMitsFlilewzw

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

hwyhnvxojelgbsloHidlyevfvy

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

ctcihwko

sgdvjglsjdsadevyiz

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

cialis over counter walmart

Cialis Cialis generic cialis 40 mg best price
mambo 36 tadalafil 20 mg Cialis CIALIS Cialis cialis online purchase
buy cialis pills Cialis discount for cialis
cialis from mexican pharmacy once a day cialis 5 mg cialis Cialis ?????? cialis ??? cialis thailand

hwyhnvxojelgbsloHidlypzpbf

viagra https://zvigariageneric.com/ - generic viagra viagra viagra viagra without doctor prescription

order cialis without a prescription

buy viagra cialis CIALIS cheapest price on cialis
original cialis CIALIS legitimate online pharmacies that sell cialis cialis CIALIS
CIALIS cialis purchase cialis and advil
Cialis online viagra without prescription cialis side effects of cialis is cialis now a generic? CIALIS

how to take tadalafil tablets 20mg

cialis generic tadalafil tadalafil sublingual 75 mg cialis
safe cialis online cialis printable coupons cialis with pulmonary hypertension cialis cialis
Cialis tadalafil india 60 mg use cialis
how to buy viagra without a prescription celias pills cialis Cialis Cialis CIALIS

ngbfhfgMitsFlilebmg

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

cialis

Cialis generic cialis available cialis
cialis cialis without a doctor 20mg cialis generic for cialis in the usa cialis
what are the side effects with cialis e20 pill cialis generic cialis for less
cialis inexpensive cialis buy cialis online without a prescription CIALIS viagra/cialis Cialis

ningrgtrggififleconnaredqry

cialis 20mg http://genericcialls.com/ - online cialis cialis 20mg generic cialis cialis