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

buy pfizer viagra

generic viagra canada
buy generic viagra http://viagra-generics.us/ viagra generic
which is better viagra levitra cialis

viagra art

only now buy viagra com

https://frviagrafrance.com/ - cheap viagra brand 150mg
cialis viagra levitra vs

enter site order cheap viagra

viagra rebate

why does viagra give you a headache
viagra generic
discount coupons for viagra

bsgsdecdklnhajbeimmitterihexvh

custom writings https://paperwriterasq.com/ - math homework help best resume writing service community service form professional resume writing service

bsgsdecdklnhajbeimmitteribwfdc

places to do community service https://paperwriterasq.com/ - essay help resume services writers help proofreading services

how long does a viagra tablet last

viagra age
buy generic viagra http://viagra-generics.us/ buy generic viagra
generic viagra at walmart

bsgsdecdklnhajbeimmitteriqwpwb

editing services https://paperwriterasq.com/ - online editing resume writing services homework help cpm org homework help

nsolvglsjdsadevyfg

online assignment help https://buyingpaperdil.com/ - professional paper writers writing essays for money academic writing writing essays for money

bsgsdecdklnhajbeimmitterilkujh

paper writer https://paperwriterasq.com/ - do my homework homework help online cpm org homework help essaywriter

3 paragraph argumentative essay wit

legal essay competition 2018 http://essaywriterupk.com/ - diversity essay for graduate school essay writers review free compare and contrast essay examples point by point

viagra in india cost in india

kroger pharmacy viagra price

https://frviagrafrance.com/ - viagra apotheek online
only now buy viagra com

achat viagra en ligne suisse

tarif viagra en franc

farmacia de tienda de viagra

https://deliveryviagranow.com/ - cheap viagra
buy generic viagra

viagra 25mg prices

sgbssbdsjamerbmc

write my paper https://bestessaysold.com/ - writing a paper write essays for money writing a paper essay for you

dzuehkzoxr

[url=https://xenical24.com/]xenical price[/url] [url=https://wellbutrinbupropion.com/]buy wellbutrin online[/url] [url=https://hydroxychloroquine.us.org/]cost of plaquenil uk[/url] [url=https://atorvastatin.us.com/]buy lipitor[/url] [url=https://valtrex.us.org/]valtrex for sale cheap[/url] [url=https://erythromycinz.com/]erythromycin buy[/url] [url=https://furosemidelasix.com/]buy lasix[/url] [url=https://ventolinh.com/]can i buy ventolin over the counter in nz[/url] [url=https://kamagratb.com/]buy kamagra online[/url] [url=https://clonidinenorx.com/]clonidine pills[/url] [url=https://cymbaltaduloxetine.com/]where to get cymbalta cheap[/url] [url=https://ciprofloxacin24.com/]ciprofloxacin 500 mg[/url] [url=https://sildenafil36.com/]sildenafil online[/url] [url=https://avanatop.com/]buy avana[/url] [url=https://singulair.us.org/]singulair generic brand[/url] [url=https://tadalafilsale.com/]tadalafil tablets for sale[/url] [url=https://amoxicillinz.com/]where to buy amoxicillin[/url] [url=https://doxycycline36.com/]order doxycycline no prescription[/url] [url=https://silagra24.com/]generic silagra[/url] [url=https://isotretinoinacutane.com/]buy accutane[/url]

actual shelf life of viagra

girlfriend took my viagra
generic viagra http://viagra-generics.us/ viagra generic
buy viagra uk

viagra on amazon

what is the best herbal viagra
viagra generic
when viagra invented

n620it7 y474yq

You actually reported this effectively. [url=https://canadianpharmaceuticalsonlinerx.com/]online pharmacies[/url]
[url=http://imitom.com/viewtopic.php?f=37&t=2015498]i443xfl a89mxs[/url] 4cc8e1f

how good is viagra

viagra and penile injections
where can i buy female viagra uk
women on viagra

sgbssbdsjamerbsg

write my paper https://bestessaysold.com/ - writing essays for money write my paper for me cheap custom research papers essay helper

fwpyrgikploimmitterilypfd

do my homework https://paperhelpvetz.com/ - paper help community service form homework help paper writer

fqwqcumv

[url=http://baclofen24.com/]buy baclofen[/url]

how to get viagra us

how to get viagra to work
generic viagra
how to make watermelon viagra

bsgsdecdklnhajbeimmitteriwsuzz

best essay writing service https://paperwriterasq.com/ - resume writing service homework help math homework help best essay writing service

z71vis3 k630nd

You definitely made your point. [url=https://canadianonlinepharmacytrust.com/]trust pharmacy canada[/url]
[url=http://shbaby.net/ar/?p=22534#comment-6588117]s87ruyt u62mlh[/url] f4cc8e1

viagra raw recipe

viagra class action lawsuit
buy generic viagra http://viagra-generics.us/ viagra generic
uk viagra

fwpyrgikploimmitteriqxbym

check my essay https://paperhelpvetz.com/ - essay writers homework help online diploma online homework help online

e66rkk3 s41suz

Thanks, Plenty of knowledge.
[url=https://canadianpharmaceuticalsonlinerx.com/]top rated canadian pharmacies online[/url]
[url=https://www.blogger.com/comment.g?blogID=2282791721210870801&postID=7339466890432120151&page=1&token=1593544890384&isPopup=true&bpli=1]w704zqa k68ydh[/url] ec618fe

sgbssbdsjamerbyp

cheap custom research papers https://bestessaysold.com/ - college essay service paper help paper help pay for essays

sarah schnare viagra

how viagra was invented
viagra generic
viagra or cialis for premature ejaculation

a40mzn8 l40htr

Whoa all kinds of superb knowledge. [url=https://canadianpharmaceuticalsonlinerx.com/]rx pharmacy[/url] [url=https://canadianpharmaciescubarx.com/]mexican pharmacies shipping to usa[/url] [url=https://canadianpharmacyntv.com/]canadian online pharmacies[/url] [url=https://canadianonlinepharmacytrust.com/]cvs pharmacy online[/url]
z68uxgk a68sca s27ssbn m807km m27dyw8 f23bmd 86b4f4c

fwpyrgikploimmitteriaoazj

paper writing service https://paperhelpvetz.com/ - cheap essay writing service help with homework п»їresume help customer service resume

w71losn e31ekc

Regards, I value this! [url=https://canadianpharmacyntv.com/]canadian pharmacy viagra brand[/url] [url=https://canadianpharmaceuticalsonlinerx.com/]canada drugs online[/url]
i30crh8 s17zcs w20mzxb p640hq l60qxro e16ksk 69a186b

acquistare viagra farmaci

blueberry 100 viagra

https://frviagrafrance.com/ - viagra barata madrid
buy cheap viagra with amex

viagra anwendung wirkun

cialis generika 2010

228331 cheap generic cialis 30 mg

https://ciadeutschland.com/

cialis cheapest price 5 mg

l85zip3 f70cxg

Terrific material, Many thanks! [url=https://canadianonlinepharmacytrust.com/]canada pharmaceutical online ordering[/url]
t63euia y46abc c618fed

sgbssbdsjamerbbx

pay for essays https://bestessaysold.com/ - term papers for sale edit my paper pay for essays essay for you

viagra for sale canada

women who try viagra
buy generic viagra
side effects of viagra

sgbssbdsjamerbhb

pay for essay https://bestessaysold.com/ - essay for you academic writing edit my paper term papers for sale

price of viagra at walgreens

viagra def
viagra 25mg price
i am a woman and i took viagra

wzcvfqrk

[url=https://finpecia911.com/]finpecia 1 mg[/url]

viagra household use wharton

what does it mean to take viagra daily as needed
buy generic viagra https://viagra-generics.us generic viagra
he is taking viagra and making love for hours

nsolvglsjdsadevysp

write me a paper https://buyingpaperdil.com/ - write my thesis write my thesis essay for you write essays for money

wntyjgrj

[url=https://levitra36.com/]compare prices of generic levitra[/url] [url=https://buspar.us.com/]buspar medication[/url] [url=https://ventolinh.com/]ventolin over the counter[/url] [url=https://sildenafil36.com/]buy sildenafil australia[/url] [url=https://priligytab.com/]where to buy priligy[/url]

nsolvglsjdsadevymn

essay for you https://buyingpaperdil.com/ - essay helper do my research paper buy term papers online write my thesis

viagra helps high blood pressure

how to viagra online
viagra generic
how to buy viagra online in usa

can viagra lower blood pressure

what type of medication is viagra
generic viagra
viagra single packs how much

inexpensive viagra

cani use viagra after biopsy of prostate
comparison and contrast viagra vs cialis
how common is priapism with viagra

ketoconazole viagra interaction

flomax and viagra
viagra generic viagra-generics.us generic viagra
which of the following drugs should not be taken while using viagra? _____

we recommend viagra price usa

viagra shop usa

https://deliveryviagranow.com/ - viagra mercury drug store
viagra professional barata

prezzo viagra rosa