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

fxykvs

motilium medication domperidone mal 10mg domperidone moa
domperidone mal 10mg cost of motilium domperidone for dogs

yicwezdd

pxajeijn

viagra through mail

rmxqeudt

lrdgxunm

hrsddvjs

canada online drugstore

canadian pharmacies without prescription
canada meds canadian pharmacies without a prescription cialis without a prescription canadian rx buy generic cialis canadian pharmacy drugs from canada where can you buy viagra cheap viagra from india online canadian pharmacies www.canadian pharmacy
canadian pharmacy online online canadian pharmacy viagra expiration date cialis at canadian pharmacies viagra online canadian pharmacy

tmxnurmp

kuzojf

domperidone medscape domperidone dogs domperidone maleate structure
cost of motilium domperidone bnf domperidone maleate tablet

iayfbcpz

viagra cheapest price

cheap viagra 100mg
cialis 5mg best price discount rx drugs buying cialis canada viagra without a doctor prescription from canada viagra canada online pharmacy viagra coupons cialis online pharmacy cialis best price viagra samples free viagra pills
viagra canada pharmacy generic viagra pills canadian pharmacy viagra online cialis cheap canada buy cialis online canada

viagra pills for sale cheap

rkvkilcn

clkcdkwnu

qcymukno

kawkiyoo

generic viagra pill in usa

lxkuhhdm

viagra 40 pills for 99

gtylrbwv

uayggqqo

viagra for sale online

is lisinopril a diuretic afhdvbcimmitterinuqin

buy hydrochlorothiazide 25 mg coronavirus lisinopril lisinopril medscape lisinopril leg cramps

jqqfkapl

usa pharmacy online viagra

a6l2fl

flagyl metronidazole dosing flagyl 400 dosage flagyl iv dose
flagyl dosing dental flagyl dosage forms flagyl class drug

viagra super active

non generic viagra

generic viagra from usa

where can buy viagra cheapest price

canadian pharmacy with viagra

cialis from canada pharmacy
prescriptions canada women and viagra generic viagra pills viagra tablets cialis at canadian pharmacy canadianpharmacy.com order generic viagra viagra free sample list of canada online pharmacies generic pharmacy
buy canadian drugs without prescription discount meds best online canadian pharmacies buy cheap generic viagra viagra australia

canadian pharmacy - cialis

canadian pharmacy without prescription
cialis online canada pharmacy buy viagra cheap where to buy viagra online walmart rx prices [url=http://ezproxy.cityu.edu.hk/login?url=https://cutt.ly/BQkEzvX]canada online pharmacy viagra[/url] viagra cost cheap viagra for sale viagra coupon discount cialis [url=https://docdro.id/Fhp8zCz]cialis without a prescription[/url]
canadian pharcharmy online cialis metoprolol viagra online prescription canadian medications [url=http://forum.prochip.com.ua/home.php?mod=space&uid=89017]order medication online[/url]

cialis 5 mg vs viagra

thodqpcp

dqunznho