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

http://viagravvr.com viagra 4v6o5k

Weano

canadian pharcharmy online
generic viagra
levothyroxine
buy viagra

h1oeoqw6

th2jh4c3

wh0cd44378 [url=http://cipro4you.us.com/]buy cipro no prescription[/url] [url=http://furosemide365.us.org/]furosemide 80 mg[/url] [url=http://cialis2018.us.org/]cialis[/url] [url=http://glucophage4you.us.com/]Glucophage Xr 500mg[/url] [url=http://estrace4you.us.com/]ESTRACE CREAM COST[/url] [url=http://ampicillin4you.us.com/]ampicillin[/url] [url=http://wellbutrin365.us.org/]wellbutrin xl 300 mg generic[/url] [url=http://prednisolone4you.us.com/]prednisolone 40 mg[/url] [url=http://tretinoin4you.us.com/]tretinoin[/url]

43puhiw0

wh0cd57194 Cialis

uxxbywlp

onjzilxk

online installment loans installment loans for bad credit bad credit installment loans installment loan

dbuqffve

academic paper free lance writing freelance writers academic writing

4pny1zky

wh0cd44378 [url=http://levaquin4you.us.com/]Levaquin[/url] [url=http://sildenafil911.us.com/]sildenafil 20 mg[/url] [url=http://dapoxetine4you.us.com/]dapoxetine 30mg[/url] [url=http://propecia365.us.org/]cost of finasteride[/url] [url=http://cialis50.us.com/]cialis[/url] [url=http://ventolin4you.us.com/]ventolin[/url] [url=http://cefixime4you.us.com/]CEFIXIME ANTIBIOTIC[/url] [url=http://cialis365.us.org/]cialis[/url] [url=http://glucotrol4you.us.com/]glucotrol[/url] [url=http://lasix365.us.org/]lasix[/url] [url=http://bactrim365.us.org/]bactrim[/url] [url=http://clomid4you.us.com/]Clomid Over The Counter[/url] [url=http://lasix4you.us.com/]lasix 100 mg[/url]

kamulyu6

hcrbxvcv

money fast 500 fast cash money fast money fast

l4839thl

best herbal viagra

h https://cialisgrx.com generic cialis reviews https://cialisgrx.com >cialis for sale wonder tadalafil online canadian cialis

i880mqt9

se0rzkz9

x56xsw2u

best online store viagra

order generic viagra uk
viagra without prescription
order sildenafil
viagra without a doctor prescription usa
viagra sale melbourne
viagra without prescription
generic viagra from canada online
viagra without prescription
se puede comprar sildenafil sin receta

nx7fkzms

itupq4z1

wh0cd55870 [url=http://clomid4you.us.com/]example[/url] [url=http://rocaltrol4you.us.com/]rocaltrol[/url] [url=http://sildenafil2018.us.com/]Sildenafil[/url] [url=http://clindamycin4you.us.com/]clindamycin[/url] [url=http://lexapro911.us.com/]lexapro[/url] [url=http://lisinopril365.us.org/]losartan lisinopril[/url] [url=http://tretinoin4you.us.com/]tretinoin gel 0.1[/url] [url=http://cefixime4you.us.com/]cefixime 400 mg buy online[/url] [url=http://retin-a4you.us.com/]retin a tretinoin[/url]

slqunljx

bad credit loans guaranteed approval bad credit loans guaranteed approval bad credit loans guaranteed approval [url=https://badcreditloansguaranteedapproval.us.org]loans guaranteed approval[/url]

qcreaturem

m http://zithromaxjinn.com buy cheap zithromax http://zithromaxjinn.com >zithromax online no prescription skin infections being azithromycin iv zithromax online

61mfijlq

6gdo0rde

wh0cd87084 paxil abilify celebrex

m57pqrhz

kd0hp3ph

wh0cd44378 [url=http://medrol4you.us.com/]solu medrol iv[/url] [url=http://lipitor4you.us.com/]lipitor[/url] [url=http://trazodone365.us.org/]trazodone 25 mg[/url] [url=http://kamagra365.us.org/]kamagra chewable[/url] [url=http://trazodone4you.us.com/]trazodone[/url] [url=http://clindamycin4you.us.com/]clindamycin[/url] [url=http://requip4you.us.com/]extra resources[/url] [url=http://cialis911.us.com/]generic cialis 40 mg[/url] [url=http://bactrim365.us.org/]bactrim[/url] [url=http://bupropion4you.us.com/]bupropion hcl xl 300 mg[/url]

ljgaypwz

vyodbaoh

fy5zxf09

wh0cd55870 [url=http://sildenafil247.live/]sildenafil[/url] [url=http://dapoxetine111.live/]dapoxetine[/url] [url=http://cipro247.live/]cipro[/url] [url=http://anafranil2018.world/]anafranil ocd[/url]

8suyu0bz