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

sex pills for men viagra

female viagra quanto dura

https://itsviagranew.com/ - viagra online

online viagrabest price for 10 viagra pills

https://kaufenvia20.com/ - viagra generika

viagra kaufen billigcash advance Denver CO

http://loansoloie.com/ - no faxing payday advance

payday loans online

viagra online in us

usefull link viagra com

https://viagrahereandgood.com/ - viagra canada london drugs
i recommend viagra medication

viagra en pharmacie en france

brand cialis online awp

buy viagra buy only 1 pill

http://viagraeuw.com/ - buy generic viagra

generic viagra onlinewe use it cheapest uk viagra

https://viagrafornow.com/ - viagra without a doctor prescription usa

best place to buy generic viagra online

viagra comparateur prix

5ad011 site es cheap viagra

viagra generic

like viagra pill face

stores that sell viagra

https://viagrahereandgood.com/ - viagra cheap
viagra kaufen in tschechien

viagra marketplace

achat de viagra forum

cialis 20mg cp pellic

http://cialisuqpor.com/ - cheap cialis

online cialischeapest us cialis

http://cialisuqwc.com/ - buy cialis

cialis cheapcialis 20mg dangers

http://cialisuyew.com/ - cialis online

online cialisusefull link getting cialis

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

generic cialis

20mg cialis in srilanka

cialis 50mg pills

https://cialisactivesupers.com/ - cheap cialis online

cialis

[url=https://levitra100pudoff

[url=https://levitra100pudoff.com/]buy levitra online [/url] levitra online [url=http://propeciaok.com/]where to get propecia [/url] how much does propecia cost [url=https://synthroidxxl.com/]cheap synthroid pills [/url] synthroid for sale online

fjdukckr

prix viagra franc

100 mg viagra wirkung

https://viagrahereandgood.com/ - cheap viagra without rx
cheap viagra

australia online viagra

udpfcjrr

viagra tablet price in delhi

3cfd11 cialis india cheap

generic cialis tadalafilpreisvergleich cialis 20

acquisto cialis in italiaviagra reviews uk

viagra cheap

viagra roche precio argentina

viagra information

https://viagrahereandgood.com/ - acquisto viagra i
generic viagra

viagra in ayurveda

cialis e analisi del sangu

6f5611 existe o generico do cialis

online cialiscialis tienda en lnea gr

cialiswhere to buy safe cialis

cialis online

tadalafil 20 mg buy online Weddrepsy

where to get cialis in south africa http://www.dawnsplayground.com/cgi-bin/autorank/out.cgi?id=mk1787&url=ht... - dawnsplayground.com typical dosage for cialis dawnsplayground.com ervaring met cialis kopen

usefull link viagra com

viagra in saudi arabia

https://viagrahereandgood.com/ - best generic products viagra
places where i can buy viagra

viagra at a resonable price

cialis 5mg price cvs

3fa821 viagra blue pills uk

https://frviagrafrance.com/ - viagra vente

order cialis generic 10 qty

https://genericedpills20.com/ - cheap cialis online

achat cialis generique europe

https://genericialis20up.com/ - generic cialis 20mg

order soft tab cialis

https://itcialis20.com/ - acquisto cialis

money market account work

cc0021 cialis 30 anni

https://ssupercialisever.com/ - cheap cialis

ex pharmarx generic viagra

viagra achat en belgique

https://viagrahereandgood.com/ - buy viagra
liquid viagra sachets uk

cheap aldactone free viagra

leap office software free download for windows 10 64 bit cad

free cad software 2020 2D 3D CAD software site to [url=http://buyautocad.design/#]buy cad software[/url] software origin 2020. free office software that is compatible with microsoft [url=https://boroborn.com/55/#comment-166976]2020 design software lighting software[/url] fed69a1 software origin 2020 engeeeneringu#$sssaunnplus , office software gratuito. 2020 interior design software pvt ltd, svci 2020 software download https //mega.nz/# ff4htkhy rppgnkf9mugkzarqdbiihlnzboey32ka5gtapjqe2wo office software on chromebook free nas software 2020. logitech gaming software download 2020 2020 cabinet design software demo, rt809h programmer software 2020.

cialis flavored bon marche

340f21 y viagra eyaculacion

https://viagraonlinegfsd.com/ - viagra cheap

50 mg of viagra last how long

https://viagrasupertreat.com/ - generic viagra

viagra for mental impotence

https://viagratodaybest.com/ - viagra online

buy 150 mg viagra

https://viagratodo20.com/ - best place to buy viagra online

viagra rezeptfrei bankeinzug

viagra commercial music 2013

https://viagrahereandgood.com/ - buy viagra online
viagra supermarch

i recommend viagra medication

is generic super viagra good

i viagra

https://viagrahereandgood.com/ - compra libre viagra
buy generic viagra online

viagra bas prix

viagra para mujer natural

fb7431 follow link cialis sale buy

http://cialisuqpor.com/ cialis ohne kreditkarte

http://cialisuqwc.com/ cialis bph low

http://cialisuyew.com/ compri cialis in italia

https://cialisverygoodn.com/

viagra online schnel

fb7421 tadalafil 20 milligrams cialis

http://cialisuqpor.com/ - cialis online

cialis okay fur frauen

http://cialisuqwc.com/ - cialis online

order cialis online au

http://cialisuyew.com/ - buy cialis

cialis generico quanto costa

https://cialisverygoodn.com/ - cialis

compra cialis farmacia

843e31 le prix par pilule de viagra

https://viagrafornow.com/

ricetta viagra natural

930a21 buy oryginal cialis

https://genericedpills20.com/ - generic cialis online

viagra generico en andorra

244821 only here cialis refractory

http://cialisuqpor.com/ - buy cialis online

cialis once daily dosage

http://cialisuqwc.com/ - cialis online

buy generic viagra and cialis

fb7421 name brand viagra

https://viagrahere20.com/ - online viagra

can woman take mans viagra

http://viagraoier.com/ - viagra cheap

viagra in der tschechei kaufen

https://viagraonline20up.com/ - generic viagra

viagra bestellen auf nachnahme

https://viagraonlinegfsd.com/ - online viagra

cheap viagra caps

244821 cialis como salen inglaterra

https://cia20online.com/ - cheap cialis

payday loans direct lenders only online

cc0021 wo viagra online kaufen forum

https://viagrahere20.com/ - viagra

viagra canada real

http://viagraoier.com/ - canadian viagra

viagra harder

https://viagraonline20up.com/ - buy viagra online

buy liquid viagra for women

https://viagraonlinegfsd.com/ - viagra cheap

lloyds at uk is

muestra de mdico de is

bd65 follow link daily is

bd65 be legit is

bd65 is 5 mg work 4 to 5 days

bd65

is tab c 1 10 mg

precio ato de is

53e7 look there internet is

53e7 ebay is tablets

53e7 is on adelaide

53e7

mdmkevog

at is pills overnight

is long term usage

1a96

just try dosage viagra

viagra buy adelaide

https://viagrahereandgood.com/ - buy viagra
viagra envio espaa

viagra de 100mg a la venta

price of viagra at costco

review viagra uk net

https://viagrahereandgood.com/ - viagra generic
generische viagra kaufen

se il viagra non fa effett

students caught using custom writing services

prescription cialis buy canada

http://cialisuqwc.com/ - online cialis

generic cialis

buy viagra cheap canada

generic viagra acces rx

https://viagrahereandgood.com/ - best viagra prices online
buying viagra on line

viagra ship to canada

viagra tabletten bestellen

best book review writer

https://tabserectilecheap.com/ - generic cialis

cialis

places where i can buy viagra

viagra related deaths

https://viagrahereandgood.com/ - nuovo viagra
buy viagra online

viagra tuoteseloste

viagra 25 mg vademecum

compare viagra prices online

https://viagrafornow.com/ - best place to buy generic viagra online

online doctor prescription for viagraprecio viagra en costa rica

https://viagrahere20.com/ - buy viagra

viagra

brand viagra professional

411611 how to get viagra from doc

where can i buy viagra over the counterclick now pfizer viagra

buy viagra

acquistare cialis sicur

751831 enter site buy viagra china

https://viagratodo20.com/

just try cheap viagra pill

viagra chi lo ha provato

https://viagrafornow.com/ - how much viagra should i take the first time

viagra online canadian pharmacyonly here brand viagra

https://viagrahere20.com/ - viagra online

online viagra

cialis professional prezzo

cialis 5 mg 28 compresse

https://tadaladilss.com/ - cheap cialis

cialis online

jdwogrjg