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

cialis 10mg WilliamaLak

uses for cialis for daily use
buy cialis online
can you take cialis and high blood pressure medication
cialis generic
take cialis without ed

cialis WilliamaLak

can you use cialis after expiration date
buy cialis online
cialis webshop
cialis coupon walgreens
cialis young males



generic viagra 100mg - generic viagra for sale viagra generic date is there a generic for viagra generic viagra online pharmacy


buy cialis online WilliamaLak

cialis bad for heart
cialis coupons
cialis lilly wirkung
buy cialis
back pain due to cialis

Hoariaaxova acmrz

Goamerydayday gwitt



trazodone sleep - trazodone withdrawal trazodone 100mg what is trazodone trazodone alcohol


generic viagra online pharmacy - viagra generic name cheapest generic viagra generic viagra for sale is there generic viagra


cialis pills WilliamaLak

efecto cialis en mujeres
canadian pharmacy cialis
achat cialis belgique
cialis coupons
bringing cialis in thailand


canadian online pharmacy - canada online pharmacy online canadian pharmacy online pharmacy canada canadian online pharmacy


best place to buy generic viagra online - cheapest generic viagra generic viagra for sale canadian generic viagra generic viagra for sale


is trazodone a controlled substance - trazodone drug class trazodone 100mg trazodone 100 mg trazodone for sleep dosage

cialis cost WilliamaLak

viagra or cialis for pe
is there a generic for cialis
cialis with xanax
cialis buy from india



canadian pharmacy online - best canadian online pharmacy online pharmacy canada canada drugs online canada drugs


Admimetib wklcv

Goamerydayday vbtww


seroquel withdrawal - quetiapine davis pdf generic seroquel seroquel generic quetiapine side effects

cialis generic WilliamaLak

how many cialis can you take in a day
buy cialis online
what drugs should not be taken with cialis
buy cialis online
wildcat cialis review

Hoariaaxova vctzk