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

mumkxktk

z4aduv

aciclovir acyclovir side effects acyclovir 800mg tablets
acyclovir 400mg tab acyclovir side effects acyclovir 800 mg price

5lpwku

no prescription cialis cialis black buy cialis pills
tadalafil 5mg prices natural cialis gnc cvs cialis price

genuine viagra

free viagra sample before buying supremesuppliers

6d2juf

canadian tadalafil online 20mg cialis review cialis
price of tadalafil tadalafil 20mg cialis daily

dfovmjsb

tipeglme

verik8

viagra free sample non prescription viagra 150 mg viagra
viagra triangle chicago viagra overnight viagra script

iuqpfuma

viagratechno

sildenafil 20 mg cost in india sildenafil citrate women sildenafil mexico price

vwio5c

generic cialis canada tadalafil sublingual cialis daily pill
tadalafil citrate dosage generic cialis tadalafil cialis paypal australia

zvehzr

cialis daily prescription tadalafil canada generic cialis 2017
cialis from canada prescription cialis cialis from australia

9nvnug

cialis 20mg europe cvs cialis generic cialis coupon
cialis 100mg india daily cialis review walmart cialis price

02viy2

tadalafil natural substitute price of tadalafil buy cialis pills
purchase cialis online cheapest cialis prices tadalafil online

xfotdy

levitra 20mg online levitra dosage options where to buy levitra
buy levitra canadian pharmacy generic vardenafil uk levitra overdose

xomztryo

fz8br5

viagra for women vardenafil vs sildenafil viagra canada drugstore
sildenafil 20mg viagra falls generic viagra 200mg

zmhjnpad

a26nzs

compare viagra prices viagra sample acheter viagra
sildenafil sandoz 20mg sildenafil viagra canadian pharmacy

tw7nmr

pfizer viagra coupon online viagra viagra free samples
sildenafil gel uk interactions for sildenafil buy viagra pills

jkdstvub

yxvpo7

sildenafil tabs 20mg cheap sildenafil 100mg i need viagra
sildenafil tablet 200mg sildenafil citrate viagra sex

pharmacie chanzy angers eu

pharmacie boulogne billancourt silly therapies dites breves , pharmacie niort pharmacie de garde aujourd'hui cherbourg , Lyrica sin receta Argentina, Comprar Lyrica envГ­o libre. Lyrica en la farmacia Argentina Comprar Lyrica 75 mg genГ©rico [url=https://kit.co/pauzatha/lyrica-precio-argentina-lyrica-sin-receta-argentina#]Lyrica en la farmacia Argentina[/url] therapie cognitivo comportementale mons Ventolin precio Guatemala, Ventolin venta libre Guatemala. Comprar Ventolin 100 mcg sin receta Comprar Ventolin 100 mcg genГ©rico [url=https://kit.co/miefreeksourc/ventolin-precio-guatemala-ventolin-en-la-farmacia-guatemala#]Ventolin en la farmacia Guatemala[/url] , pharmacie brest jaures pharmacie auchan mantes , pharmacie nouvian beauvais. therapie de couple yvelines avis pharmacie annecy les fins Comprar PrГ©gabalina 150 mg genГ©rico, PrГ©gabalina venta libre Ecuador. PrГ©gabalina en la farmacia Ecuador Comprar PrГ©gabalina 150 mg genГ©rico [url=https://kit.co/inaken/comprar-pregabalina-150-mg-generico-comprar-pregabalina-envio-libre#]Comprar PrГ©gabalina envГ­o libre[/url] , pharmacie de garde jijel aujourd'hui. parapharmacie tanguy bourges, pharmacie la garenne argenteuil pharmacie de garde marseille ouverte la nuit . pharmacie bailly gare st lazare, pharmacie ouverte montpellier pharmacie marseille pharmacie ustaritz .

un5e20

tadalafil generic india tadalafil 20mg mexico uses for cialis
cialis professional ingredients cialis black pills daily cialis coupon

8kwciu

cialis price europe cialis com coupons generic cialis sale
cialis 100 cialis free trial tadalafil natural substitute

gyifbpdr

hgp0ob

viagra price viagra cost homemade viagra
sildenafil 20 viagra price walmart 200mg viagra

5ri027

cialis generic tadalafil 100mg tablets tadalafil gel
generic cialis mexico daily cialis dose tadalafil 6mg capsule

pqdcjnxs

generic viagra 100mg next day

cialis without a doctor's prescription cialis no prescription

uckepiet

igdcupdq

Situs Judi Online

Situs Judi Online

6watts

flagyl antibiotic flagyl 500 flagyl antibiotic 500 mg
metronidazole gel warnings for metronidazole interactions for metronidazole

generic viagra best prices

cialis without prescription cialis online without prescription

j3z5qq

finasteride 1 mg finasteride side effects warnings for finasteride
finasteride uses interactions for finasteride warnings for finasteride

moyslacq

cheap viagra pills

cialis online no prescription cheap cialis no prescription

zfod1f

finasteride 5mg side effects dutasteride vs finasteride finasteride medication
finasteride 1mg cost finasteride prescription finasteride 1mg