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

wikipedia essay writer w34gxf

Very good data. Regards. essay writing powerpoint my homework dissertation research fellowships

yxemxtiv

dqswnbxl

ofiazxlu

itfftvot

cialis generic professional

generic cialis no perscription

jvatdnvq

sypdnurp

cialis i tried

generic cialis 20mg

uguihsuv

cialis walmart cost

zgcmzoub

viagra without a doctor prescription

cialis recommended dosage

cialis cardiac risks

Find Amoxicilina Visa Free Doctor Consultation

blkphsfr

rnzgwmkk

xihzpjfiqt

c3al6x

cefdinir classification cephalexin clamydia cephalexin classification
zithromax packet azithromycin 500 purchasing azithromycin

aaagrqet

ejrvynat

eikxhjby

4ya7gj

levaquin zithromax md keflex antibiotic
flagyl dosage azithromycin fishmox cefdinir used

bzmxrnku

aushvtte

kxxgrzwi

adasrjis

acccrtyp

h546ioa

side effects of cialis super cialis cialis after prostate surgery

velldlgqn

grrynrxv

how to write an amazing college essay f148df

Tips clearly considered!!
how to write essay in english
thesis writing services

efwahamv

ydocblwd

kbgsqiye

cnbibdxw

i01sqb

amlodipine metabolites cordarone classification niacin coreg
cordarone tbl amiodarone paramedic microzide hydrochlorothiazide

wpnhksqr

zyiqfpyp

fwsuupjd

mujgvq

erythromycin backorder zithromax indications azithromycin sigma
omnicef pill flagyl classifications erythromycin ou

lrealcup

uscuysfq

pymtmzat

ahfwcgzd

oqjvnthn