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

does aetna cover viagra

i use it buy viagra generic

https://viagraviagra20.com/ - buy viagra online
spyware buy viagra dose

pfizer viagra coupons

zqyvhwhd

costo delle pillole cialis

veilig online cialis kopen

https://cialishowmuch.com/ - generic cialis

cheap cialistablets cialis tadalafil

http://cialisooie.com/ - cialis online

discount cialis

dose maximale viagra

viagra vs cilias

https://viagraviagra20.com/ - viagra durata effetto
buy viagra online

usefull link wwwviagracom

acheter viagra belgique

viagra in phuket to buy

https://viagraviagra20.com/ - lake viagra michigan
viagra online

acheter viagra marocai

look there viagra woman

just try viagra soft

https://viagraviagra20.com/ - generic viagra
follow link how to get viagra

principio attivo viagra

natural viagra pharmacy online

viagra til

https://viagraviagra20.com/ - viagra para comprar
viagra indications

viagra cena w aptece

best viagra price online

viagra plus overnight pharmacy

https://viagraviagra20.com/ - price of viagra
viagra 25 mg pills

cheap viagra uk paypal more

a46ero8 z20olr

Thanks a lot! Terrific information.
buy detrol canadian pharmacy king

case search pennsylvania

kpacmiougvtj circuit court miami dade county case search
north carolina case number search milwaukee municipal court case search illinois simple case search las vegas family court case search

viagra billigst

viagra 5mg price

https://viagraviagra20.com/ - cheap viagra
viagra generic

viagra chino venta

z150gf6 v333rf

You actually explained it very well! cephalexin sale on line pharmacy

n479ozl g75yas

Terrific posts, Thanks a lot.
provestra sale canada drug

fsbdgwfiiloHidlyxlmrt

college application essay service http://viagrapfhze.com/ - college essay review services essay on community service college application essay editing services cheap essay writing service usa

click now order daily cialis

40 mg cialis online uk

https://cialisnowup.com/ - cialis in farmacia svizzera
cialis uk without prescription

cialis las palmas

viagra plus overnight pharmacy

viagra to buy in uk

https://viagraviagra20.com/ - viagra
viagra ou cialis levitra

viagra genaric medikament

p36kee8 x85ovz

Nicely put, Many thanks!
buy clarinex canadian pharcharmy

cialis generico 10 mg prezzo

fda approved cialis for bph

https://cialisnowup.com/ - cheap cialis online
cialis free samples australia

cialis efectos mujeres

ddulmhtk

verordnung fr cialis

does cialis cost

https://cialisnowup.com/ - we like it 5 mg cialis
cialis tabletas bolivia

cialis online offert

cialis india buy

cialis italiano

https://cialisnowup.com/ - cialis 60 ans
cialis online pay paypal

link for you buy 5 mg cialis

achat de cialis foru

50mg cialis retail price

https://cialisnowup.com/ - cheap cialis online
le prix de marque cialis

can i buy cialis in phuket

generique cialis en ligne

cialis q es

https://cialisnowup.com/ - buy cialis online
cialis in farmacia svizzera

cialis free samples australia

acquisto cialis generic

only now drug cialis

https://cialisnowup.com/ - cheap cialis online
buy generic cialis

ordre de cialis bon march

worst case binary search

knlghqwpwzof odcr case search
case search north carolina court case search texas court case search by name sangamon county circuit clerk case search

district of columbia case search

fqkohxokvwvc ms case search
illinois judicial case search collin county court case search us supreme court case search michigan circuit court case search

cialis italiano

cialis comprimidos 20 mg

https://cialisnowup.com/ - cheap cialis
40 mg cialis online uk

cialis mit mastercard kaufen

zgxyqbmq

jgpmmxco

nevada court case search

vomchcwhddfn md case court search
illinois circuit court simple case search philadelphia case search md courts case search michigan case law search

cialis vs viper

generic cialis in uk kaufen

https://cialisnowup.com/ - buy cialis
online cialis

pillole cialis generico

cialis rapide

receta de cialis

https://cialisnowup.com/ - buy generic cialis
5 mg cialis cheap

cialis en pharmacie pari

vendita online di cialis

cialis buy tadalafil

https://cialisnowup.com/ - does cialis cost
does cialis work right away

cialis e controindicazioni

rkulbsyb

try it buy cialis super active

sale cialis jelly

https://cialisnowup.com/ - cialis not for sale
generic cialis online

cialis bph dose

cialis generico tijuana

online cialis ship to canada

https://cialisnowup.com/ - generic cialis
low cost generic cialis

generic cialis in uk kaufen

cialis q es

cialis comprimidos 20 mg

https://cialisnowup.com/ - cialis
cialis online

try it buy cialis super active

case law search engine

goyczqlbuqut orange county case search
arizona circuit court case search sd case search ga judiciary case search virginia judicial case search

we use it original cialis

mg for cialis

[url=https://cialisnowup.com/]cialis medicament prix[/url]
cialis a quel age

cialis 10 mg coments

qfcsxyrj

cialis guaranteed overnight

cialis levitra comparison

[url=https://cialisnowup.com/]discount cialis free[/url]
cialis

buy cialis online from india

siqjbyzm