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.


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)


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".


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}')
$IPTABLES -t nat -A OUTPUT -d $ETH0_IP_PUBLIC -j DNAT --to-destination $ETH0_IP

viagra generic at walgreens

daily target generic viagra at sam's club where lift virtually group price of viagra at walmart, between table by GaireEmople

viagra in liquid form prix cialis forum

buy cialis by GaireEmople

ou commander tadalafil forum cheap cialis online couple levitra ou cialis

buy cialis online by GaireEmople

is it safe to take viagra after heart attack buy generic cialis pharma med cialis

cheapest generic viagra online JosephGon

c viagra without a doctor prescription
viagra generic viagra do what does

buy cialis by GaireEmople

costo in farmacia cialis 20 mg buy cialis online what to do if you take too much sildenafil

tricare prescription cialis

cheap canadian pharmacy cialis - cialis generic

cialisviagra and daibetes - buy viagra online

viagra cheapprice viagra pills pay pal - generic viagra online

buy generic viagra

generic cialis eu

only today cialis australia - cheap cialis

cialis cheapbuying mastercard viagra - buy generic viagra

viagra onlinebuy viagra dhaka - viagra online

viagra online

buy cialis online nopw

order cialis net - generic cialis online

cialis genericuk viagra online - online viagra

canadian viagrarxusa viagra generic - buy viagra online

buy viagra online


cheap cialis
buy cialis online without a otc
sample cialis pills buy
generic cialis online

no prescription cialis in uk

cialis in aachen - cialis

generic cialisescompte viagra gnrique - cheap viagra

viagra onlineviagra pens for sale - viagra online

cheap viagra HenryRal

how can you get a prescription for viagra
viagra online
viagra apotheke deutschland
buy viagra
what does viagra do to a dog