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

down low dating sites

3p5mhfz0

yhskzxurfndsjamerbrx

mirtazapine anxiety http://mirtazapineremeronsa.com/ - remeron 30 mg remeron high mirtazapine 15 mg tablet what is remeron used for

online dating pakistan islamabad

most expensive dating websites

putbx2q4

yhskzxurfndsjamerblk

remeron classification http://mirtazapineremeronsa.com/ - mirtazapine 30mg mirtazapine 15 mg tablet remeron classification remeron 30 mg

knitorb

Cheap cialis soft http://cialisknfrx.com buy generic cialis 5mg online

free dating exeter zqfa

hrdfhbeimmitteriioipy

escitalopram vs citalopram http://citalopramcelexaad.com/ - citalopram vs escitalopram celexa 40 mg citalopram 40 mg citalopram 40mg

dating for homoseksuelle zqfa

neue dating show auf vox emuo

neeni

Generic cialis ship to canada http://cialisknfrx.com generic sale cialis pills

mscrchqq

truths about dating a scorpio

annotavalpisa anowm

senior dating over 60s

magic jack hook up

feabs

Buy tadalafil india no prescription cialis Buy Generic Cialis Online cialis 20mg generic

best hookup app in boston

nfhluzmz

personal dating agent emuo

whos miley dating

Can I Buy Generic Viagra

Generic Viagra In Canada viagraxcv.com - Best Generic Viagra Sites

7igj3owu

hrdfhbeimmitteritrtap

prozac vs celexa http://citalopramcelexaad.com/ - citalopram dosing citalopram and alcohol п»їcelexa celexa side effects

viagra from usa pharmacy

viagra online CarlosFutty

can you take viagra and levitra together
where to buy viagra
is viagra illegal in thailand
where can i buy viagra pills
side effects of mixing alcohol with viagra

pwwibhoc

Incomonut ecrxk

yhskzxurfndsjamerbwz

remeron reviews http://mirtazapineremeronsa.com/ - mirtazapine moa mirtazapine 15mg tablet mirtazapine 30 mg remeron generic name

hkggolsjdsadevyoh

weaning off effexor http://venlafaxineeffexorhf.com/ - venlafaxine hcl er 37.5 mg effexor withdrawal venlafaxine withdrawal effexor xr weight loss

pwdkkkra

describe yourself dating example

jurxbgjxhtThyncjynu

seroquel withdrawal http://quetiapineseroquelik.com/ - seroquel for dementia quetiapine interactions seroquel 25 mg seroquel overdose

wwxljogogl

dating a paramedic girl emuo

viagra paypal accepted usa

best generic viagra review canadian pharmacy viagra

nasaan na ang dating tayo download emuo