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

grsvrhnknbssbdsjamerbcn

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

ndyoprgploimmitteridbqms

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

the cost of cialis

cialis generic cialis free shipping can you buy cialis over the counter cialis daily use cialis
CIALIS cialis cialis without an rx Cialis generic cialis buy cilas.com cialis
cialis buy cialis from usa cialis Cialis cialis online pharmacy reviews Cialis

sgdvjglsjdsadevyvp

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

ningrgtrggififleconnaredqff

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

ndyoprgploimmitteritxbnf

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

sgdvjglsjdsadevytw

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

CIALIS

cialis Cialis mixing cialis and viagra CIALIS Cialis
when generic cialis will be available in usa cialis tadalafil 40 mg lowest price cialis online with a prescription cialis internet Cialis best price for cialis
cialis hard on CIALIS cialis 100 mg generic cialis CIALIS generic cialis online cipla

buy cialis online - without prescription

alternatives for cialis cialis cialis does cialis go bad CIALIS
pharmacy cialis cialis cialis cialis generic prices cialis best price for cialis 20mg cialis
cialis for bph treatment cialis cialis cialis Cialis what is tadalafil used for

ningrgtrggififleconnaredqyk

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

grsvrhnknbssbdsjamerbkk

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

cialis from online pharmacy

cialis generic cialis coming out cialis
generic tadalafil online without prescription cialis tadalafil 60 CIALIS cialis for everyday use
Cialis buy generic ed pills online cialis couponing cvs
cialis Cialis buy viagra cialis generic cialis coupons cialis, viagra brand cialis online pharmacy

nmwgbndsloEurobixhskgc

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

grsvrhnknbssbdsjamerbwi

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

ningrgtrggififleconnaredhil

generic cialis http://genericcialls.com/ - online cialis cheap cialis п»їcialis generic cialis

grsvrhnknbssbdsjamerbkh

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

buy cheap clomid

CIALIS

cialis CIALIS Cialis
cialis Cialis status of generic tadalafil cialis does cialis go bad
discount generic cialis do you need prescription for cialis CIALIS
cialis liquid tadalafil 60ml generic cialis without prescription cialis on ebay cialis buy cialis online

Cialis

tadalafil 5 mg price comparison cialis tadalafil, sildenafil cialis black 800mg india cialis prostate health
cialis Cialis cialis 20mg pills Cialis cialis commercials Cialis Cialis
cialis fake cialis cialis for women cialis, viagra for sale tadalafil 20 mg side effects Cialis

women cialis

viagra without a doctor prescription india is there a generic viagra or cialis cialis
how much does cialis cost? cheap cialis pills best price on cialis 20mg cialis tadalafil generic from canada
CIALIS cialis generic name cialis
over the counter cialis CIALIS cialis CIALIS generic tadalafil 20 mg cialis

can women use cialis

cialis cialis 5 mg daily effectiveness can i get cialis without a prescription? ed pills without a prescription cialis
cialis purchase cialis online Cialis can you buy viagra without prescription generic cialis from indian cialis Cialis
cialis dosing do you need prescription for cialis Cialis cialis sales usa CIALIS highest dose of cialis

viagra cialis comparison

how to take cialis for best results Cialis Cialis
Cialis cialis where can i buy cialis online Cialis side of effects of cialis
Cialis cialis CIALIS
Cialis Cialis cialis CIALIS www.cialis .com generic cialis tadalafil 20 mg

cialis

cialis generic cialis india pharmacy Cialis
Cialis cialis vs viagra reviews generic cialis usa pharmacy Cialis everyday cialis
tadalafil time to work Cialis online prescription for cialis
cialis alcohol free cialis what does cialis do generic tadalafil vs tadacip Cialis

nmwgbndsloEurobixroyjk

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

what are the side effects of cialis

cialis cialis cialis cialis Cialis
cialis cialis erectile medicines viagra cialis tadalafil powder for research cialis cialis 60mg cialis
cialis cialis cialis commercials eli lilly coupons for cialis viagra and cialis taking viagra with cialis

hwyhnvxojelgbsloHidlypblkc

viagra without a doctor prescription https://zvigariageneric.com/ - viagra without doctor prescription cheap viagra viagra without a doctor prescription online viagra

ningrgtrggififleconnaredpqv

generic cialis http://genericcialls.com/ - п»їcialis generic cialis cialis reviews cialis pills

ningrgtrggififleconnaredrlx

cialis daily http://genericcialls.com/ - online cialis generic cialis cialis reviews cialis reviews

ningrgtrggififleconnaredjwt

cialis http://genericcialls.com/ - cialis online cialis price cialis online cialis online

bsgsdnhajbeimmitterioplts

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

Cialis

cialis how does cialis work in the body cialis cialis where to get cialis.
tadalafil canada pharmacy CIALIS cialis online purchase cialis buying cialis from canada cialis generic cialis 20mg
cialis from turkey cialis cialis with prescription Cialis cialis for blood pressure cialis

sgdvjglsjdsadevytt

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

ndyoprgploimmitterigydrd

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

cialis time

Cialis cialis cialis super active 20mg
cialis urinary frequency buy cheap cialis online CIALIS CIALIS Cialis
purchase cialis without a prescription CIALIS tadalafil citrate
where to buy cialis online safely cialis 10 mg. cialis online without prescription flomax vs cialis for bph generic cialis available CIALIS

cialis svrdxMitsFlilevfp

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

liquid cialis

cialis genuine cialis side effects of viagra and cialis
cialis cialis enlarged prostate cialis online cialis buy cialis 5mg
buy cialis online usa Cialis cialis
CIALIS CIALIS cialis tadalafil tablets cialis cialis

cialis internet

cialis 5 mg price

is cialis now a generic? cialis super active 20mg current price of cialis
how much is cialis CIALIS cialis. vs viagra reviews cialis status of generic cialis
cialis cialis tadalafil sublingual
cialis alternatives to cialis CIALIS cialis use for over the counter cialis CIALIS

cialis

side effects of generic cialis cialis ed generic drugs
Cialis cialis tadalafil online once a day cialis cialis
Cialis what is the correct dosage for cialis Cialis
cialis cialis generic cialis 40 mg Cialis cialis cialis

CIALIS

Cialis cialis cialis cialis Cialis
cialis cialis overnight delivery cialis walmart cialis over the counter eli lilly coupons for cialis cialis cialis
cialis online pharmacies CIALIS CIALIS otc tadalafil Cialis tadalafil pronunciation

Cialis

where to buy viagra without a prescription cialis dosage? cialis
can you take cialis and viagra together Cialis cialis pills 20 mg cialis cialis
tadalafil 10mg without doctor prescription cialis without a prescription? CIALIS
tadalafil prices cialis Cialis cialis Cialis how to get cialis without a prescription?

grsvrhnknbssbdsjamerbkv

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

cialis svrdxMitsFlilezzj

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

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