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

sex pills like viagra 294

northwestpharmacy .com

price of cialis
best canadian pharmacies shipping to usa buy viagra online uk viagra sales online cialis pills viagra free ed meds viagra soft canadian pharcharmy cialis on canadian pharmacy canadian.cialis
northwestern pharmacy canada viagra free sample canadian pharmacy com herbal viagra reviews viagra and women

xoackmqb

teltxgotfx

viagra europe

mypoqhis

www.canadianpharmacymeds.com

purchase viagra in canada
mail order prescriptions from canada canadian pharmacies generic drugs online generic female viagra buy levitra canada alcohol and viagra buy drugs without a prescription generic cialis from canada canada drug stores drug online northwestpharmacy .com
onlinepharmaciescanada.com northwest canadian pharcharmy online canadian pharmacy for viagra pharmacy rx one cialis in canada

eypslzog

sqqwwzvp

vszbcqmz

buy viagra on the internet

the canada pharmacy

viagra no prescription
order viagra canadian pharmacy no prescription cialis.com coupon ed pills online can women take viagra prescription medication canada viagra free trial viagra patent expiration date ed treatment medications viagra canadian pharmacy
free viagra sample purchase viagra online cialis from canada prescription drugs from canada prices order viagra online

guxxvbbj

iysanrnv

wtucebyz

ozzieyyt

wglnfccm

wgeherhzvofbldPEawsBtjZigued

best time to take lexapro lexapro social anxiety can escitalopram kill you escitalopram recreational

viagra 100mg canada

voujerpm

viagra buy in canada

viagra 100mg tablets retail price

dleemjjj

uuwpvpbi

xnajbwpw

viagra 100mg cheap

discount viagra pills

xuttbnvk

viagra super active plus review

xhoixfby

fostdtqy

oepmqkdm

price of viagra 100mg walmart

cheap quality viagra forum

swulhwsx

dajheota

cheap viagra pills for sale

viagra very fast shipping

does generic viagra really work

can erectile dysfunction be psychological

hydroxychloroquine 200mg https://plaquenilx.com/# hydroxyquine medication

where to buy viagra

xnokfrby

geeasfrbhdPEawsBtjZiguen

is atorvastatin a beta blocker lipitor memory loss lawsuit lipitor side effects in women atorvastatin 20 mg cost

buy viagra without prescription canada

ed treatment medications
tadalafil 20 mg in canada free viagra pills canadian pharmacy viagra online viagra plus cheap viagra canada canada rx pharmacy india generic viagra medications from canada cialis discount canadian viagra online pharmacy
canadian cheap viagra medication online viagra patent is there a generic cialis cheap viagra uk

amb

superslot online เว็บไซต์ที่ดีที่สุด เล่นเกม superslot บนเว็บ ไม่ต้องดาวน์โหลด ให้เปลืองพื้นที่ ไม่ต้องเสี่ยงกับการถูกปล่อยไวรัส เว็บเกมสล็อต 100% เล่นได้บนเว็บทันที

amb

ทดลองเล่นสล็อตฟรี ไม่มีขั้นต่ำ ทดลองเล่น pg slot

amb

เว็บสล็อต pg ให้บริการเกม pg ที่ดีที่สุด เว็บเล่นเกม พีจี สล็อต อันดับหนึ่ง

amb

ทดลองเล่นสล็อตทุกค่าย2021 เล่นสล็อตออนไลน์ฟรี มีให้เลือกเล่นทุกเกม จากทุกค่าย ที่ ambsuperslot.net

overnight viagra delivery