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

sypynmkw

[url=http://buyviagranorx.com/]generic viagra 20 mg[/url] [url=http://tadalafilreal.com/]tadalafil india price[/url] [url=http://oksildenafil.com/]805551 sildenafil[/url] [url=http://sildenafiledpills.com/]buy sildenafil[/url] [url=http://cialisedrug.com/]cialis 5 mg best price usa[/url]

onahjlup

[url=http://ivermectinzp.com/]buy ivermectin[/url]

zjrbbc

tadalafil price 5mg generic tadalafil pills cialis dosage tadalafpis
cialis liquid dosage tadalafil research chemical cialis canada pharmacy

ayl81s0

4a1j1b

cialis 20mg pills cialis price in mexico buy tadalafil online
tadalafil 30mg liquid cialis 5mg price uk cialis generic usa

uzjovauci

[url=https://viagrasn.com/]order viagra mexico[/url] [url=https://cialisaf.com/]cialis 20 mg buy online uk[/url] [url=https://cialisedrug.com/]generic cialis tadalafil[/url] [url=https://sildenafilbest.com/]can you buy sildenafil over the counter in uk[/url] [url=https://viagragenpills.com/]sildenafil buy nz[/url]

e413cl

cialis lilly 20mg cialis patent expiration generic cialis canada pharmacy
tadalafil tablets ip cialis pills india cost cialis australia

elbralgj

[url=https://cialisism.com/]buy cialis canada[/url]

nwoxvgxqa

[url=https://viagrasli.com/]how to get viagra online[/url] [url=https://oralcialis.com/]where to buy generic cialis in canada[/url] [url=https://kamagraedpill.com/]viagra kamagra 100mg oral jelly[/url] [url=https://cialisms.com/]order tadalafil canada[/url] [url=https://sildenafilsx.com/]sildenafil generic coupon[/url]

tt2o7g

canadian drugstore viagra no prescription cialis cialis price
daily viagra sildenafil uses cialis 20mg uk

yqrqqwvw

[url=https://cialisbne.com/]cialis 20mg tablet[/url] [url=https://viagrahey.com/]sildenafil online coupon[/url] [url=https://bbviagra.com/]100mg sildenafil price[/url] [url=https://tadalafilfc.com/]tadalafil generic otc[/url] [url=https://oralcialis.com/]brand name cialis canada[/url] [url=https://buyciallispills.com/]cialis 2.5 mg price comparison[/url] [url=https://buyviagranorx.com/]buy generic viagra online paypal[/url] [url=https://modafinilprovgl.com/]modafinil order online india[/url]

6t3l8v

cialis tablets australia dapoxetine and cialis together cialis generic canada
cialis mastercard cialis 120 mg price of cialis pills

gqvbatna

[url=https://cialisms.com/]cialis online without prescription[/url] [url=https://pharmacysf.com/]super pharmacy[/url] [url=https://emcialis.com/]cialis 500mg[/url] [url=https://norxamoxicillin.com/]500 mg amoxicillin[/url] [url=https://genmodafinil.com/]provigil online india[/url] [url=https://pharmtp.com/]buy lasix online usa[/url] [url=https://modafinilprovgl.com/]where can i get provigil online[/url] [url=https://tadalafilds.com/]generic tadalafil from canada[/url] [url=https://buyciallispills.com/]cialis generic online uk[/url] [url=https://viagracsn.com/]buy viagra over the counter in canada[/url]

zatjvipj

[url=https://pharmtp.com/]buy lasix no prescription[/url] [url=https://clviagra.com/]viagra 20 mg cost[/url] [url=https://viagragenericdiscount.com/]purchase viagra mexico[/url] [url=https://genericcialissale.com/]indian cialis[/url] [url=https://sildenafiledtabs.com/]sildenafil generic mexico[/url] [url=https://cialisism.com/]tadalafil us[/url] [url=https://cialisms.com/]best price cialis 20mg australia[/url] [url=https://sslpills.com/]levitra 20mg for sale[/url] [url=https://cialissix.com/]cheap cialis 20mg online[/url] [url=https://modafinilprovgl.com/]buy modafinil in us[/url]

pthnpkvq

[url=https://viagrazts.com/]viagra fast shipping usa[/url]

lg7ycw

no prescription cialis cialis 10mg coupon medication cialis
what is tadalafil cialis and alcohol sildenafil price usa

zx7jl9

cialis 5mg pharmacy viagra without prescription on line cialis
warnings for viagra chewable sildenafil viagra wholesale

Im happy I now signed up

Pretty nice post. I just stumbled upon your blog and wished to say that I have truly enjoyed browsing your blog posts. After all I'll be subscribing to your feed and I hope you write again soon!

cvvbliyn

[url=http://sildenafiledpills.com/]buy generic sildenafil[/url] [url=http://worxcialis.com/]where to purchase cialis cheap[/url] [url=http://genmodafinil.com/]buy modafinil online cheap[/url] [url=http://cialistip.com/]once a day cialis[/url] [url=http://pharmacysf.com/]worldwide pharmacy online[/url] [url=http://cialisvpill.com/]where to buy cialis in canada[/url]

I am the new one

I was recommended this web site by means of my cousin. I am not certain whether this put up is written via him as nobody else know such specified about my problem. You're wonderful! Thank you!

Just want to say Hi.

First of all I want to say excellent blog! I had a quick question in which I'd like to ask if you do not mind. I was interested to know how you center yourself and clear your mind prior to writing. I've had trouble clearing my mind in getting my thoughts out there. I do enjoy writing but it just seems like the first 10 to 15 minutes are usually wasted just trying to figure out how to begin. Any ideas or tips? Cheers!

awzgefyb

[url=http://cialisnx.com/]cialis rx[/url]

haepfxbl

[url=http://viagrasli.com/]generic viagra from canada online[/url]

uycmynnm

[url=http://personalloansfin.com/]pay day game[/url]

phbiyotm

[url=https://pharmacysf.com/]online pharmacy dubai[/url] [url=https://cialisism.com/]tadalafil generic price in india[/url] [url=https://tadalafilreal.com/]generic tadalafil medication[/url] [url=https://cialistip.com/]2.5 mg cialis daily[/url]

petznzch

[url=https://viagracsn.com/]sildenafil 5 mg tablet[/url]

jsphtn

azithromycin 250 mg tablets azithromycin penicillin zithromax tablets price
azithromycin dosage azithromycin uses azithromycin 250mg tablets

4jnhiw

azithromycin medication azithromycin 250mg tablets side effects for zithromax
azithromycin 250mg tablets cost zithromax 250 azithromycin antibiotic class

sssybgue

[url=https://safeviagra.com/]generic sildenafil 20 mg cost[/url] [url=https://viagregeneric.com/]sildenafil in india online[/url] [url=https://sslpills.com/]cheap levitra no prescription[/url] [url=https://ivermectincv19.com/]ivermectin uk[/url] [url=https://cialiszmed.com/]cialis pills where to buy[/url]

eigmkbsb

[url=http://viagraqtab.com/]3 viagra pills[/url] [url=http://cialisms.com/]cialis 20mg tablets uk[/url]

93u48p

cefdinir antibiotic cefdinir for uti genericsbb cefdinir antibiotic
cefdinir antibiotic cefdinir side effects cefdinir for uti

ukhjx0

azithromycin 500 zithromax antibiotic zithromax zithromax antibiotic
zithromax 500mg price zithromax 1g interactions for azithromycin

gxjchjsj

[url=https://tadalafilds.com/]tadalafil 30 mg[/url] [url=https://cialisms.com/]cialis 60mg online[/url] [url=https://viagrasli.com/]viagra from canada[/url] [url=https://ivermectintb.com/]stromectol online[/url] [url=https://oraltadalafil.com/]canadian pharmacy us tadalafil[/url] [url=https://kamagraedpill.com/]kamagra jelly safe[/url] [url=https://sildenafiledpills.com/]chewable sildenafil[/url] [url=https://viagracsn.com/]viagra online buy[/url] [url=https://cialisism.com/]cialis daily use online[/url] [url=https://cialisedrug.com/]cost of 5mg cialis[/url]

fquurtxp

[url=http://cialissm.com/]tadalafil capsules[/url]

kawpz3

amoxicillin dosing amoxicillin 875 price how does amoxicillin work
augmentin coverage what is augmentin amoxicillin dosing

7pbj15

amoxicillin dosage for cats [url=https://augmentin22.us]amoxicillin side effects[/url] amoxicillin 250mg tablets
amoxicillin 500mg cost augmentin dosage amoxicillin 500

gd74tb

amoxicillin dosing amoxicillin 500mg capsule price amoxicillin uses
amoxicillin side effects for augmentin amoxicillin 875 mg pills

tgzukceo

[url=http://sslpills.com/]best online pharmacy levitra[/url]

w2os2l

donepezil side effects side effects for donepezil side effects of aricept
donepezil hcl 5 mg donepezil donepezil hydrochloride

i4hef5

amoxicillin trihydrate augmentin vs amoxicillin amoxicillin 500 mg coupon
amoxicillin for sale mexico amoxicillin suspension 500 mg amoxicillin

hegpzbtw

[url=https://ivermectinzp.com/]where to buy stromectol online[/url] [url=https://viagracsn.com/]buy viagra canada pharmacy[/url] [url=https://tadalafilreal.com/]tadalafil order online[/url] [url=https://clviagra.com/]sildenafil 1 pill[/url] [url=https://sslpills.com/]generic levitra online cheap[/url] [url=https://viagragenericdiscount.com/]buying generic viagra online[/url] [url=https://cialisedrug.com/]cialis online canada paypal[/url] [url=https://cialiszmed.com/]tadalafil 100[/url] [url=https://cialissix.com/]best price cialis[/url] [url=https://viagrahey.com/]sildenafil pharmacy[/url]

gcsoflfx

[url=http://viagragenpills.com/]sildenafil pharmacy uk[/url]

ddhruywk

[url=https://cialisism.com/]cheap cialis 5 mg[/url]

0rsxjz

acyclovir 400 mg acyclovir 400 mg cost acyclovir
acyclovir 800 mg acyclovir dosing acyclovir cream

wzbtrmnf

[url=https://viagraqtab.com/]otc viagra 2018[/url] [url=https://tadalafilds.com/]tadalafil 10 mg india[/url] [url=https://dvpharmacy.com/]viagra online canadian pharmacy[/url] [url=https://cialisgenericnorx.com/]canadian cialis cheap[/url] [url=https://cialisvpill.com/]tadalafil soft gel capsule 20mg[/url] [url=https://modafinilpls.com/]modafinil online pharmacy uk[/url] [url=https://fviagra.com/]where can you buy cheap viagra[/url] [url=https://tadalafilfc.com/]tadalafil prescription[/url]

1cj8m5

acyclovir 800mg tablets [url=https://acyclovir22.us]acyclovir 400 mg[/url] acyclovir cream
acyclovir cost uk acyclovir cost acyclovir

oeezxfqr

[url=https://viagrahey.com/]brand name viagra for sale[/url]

bnuoieqg

[url=http://cialisms.com/]buy real cialis online[/url] [url=http://ivermectincv19.com/]ivermectin 0.08 oral solution[/url]

cokzctiw

[url=https://sxcialis.com/]buy tadalafil online[/url] [url=https://buycialistabs.com/]cialis fast delivery[/url] [url=https://viagrapm.com/]order viagra with paypal[/url]

intermountain healthcare billing children's heart disease phpBB

https://sinrecetaes.com/ farmacia el globo