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

female cialis generico online

foros cialis sin receta

https://ciatrusstedonline.com/ - cialis super active plus uk
cialis barata

cialis cost costa rica

mkewdvdk

what size viagra come in

tipos de viagra
generic viagra https://viagra-generics.us buy generic viagra
what are the effects of viagra

average dosage of viagra

sample of viagra
buy generic viagra
what does viagra mean in spanish

ikazgjfrfhfgMitsFlilehmu

cialis buy http://cialishe.com/ - п»їcialis cialis 20mg п»їcialis online cialis

viagra mГЎs red bull

viagra traingle
how long can you keep viagra pills
viagra at cvs over the counter

chpreorgcialisprice

discount cialis in canada

https://ciatrusstedonline.com/ - cialis fedex
online cialis

venta cialis rosario

how much viagra is safe to take

accidentally took viagra in hotel with mon
does amlodipine interact with viagra
canadian pharmacy viagra reviews

viagra for women srfdevrddxMitsFlileaym

viagra for women http://viagraid.com/ - viagra price side effects of viagra viagra over the counter generic viagra

how much viagra can you bring back from mexico

what if my viagra erection won't go down
viagra generic https://viagra-generics.us viagra generic
prescription for viagra

viagra before and after tumblr

what works for ed besides viagra
generic viagra https://viagra-generics.us buy generic viagra
how long do you take viagra before it works

cialis prices at walmart

comprar cialis en puerto rico

https://ciatrusstedonline.com/ - we like it best quality cialis
recreational use cialis

cialis money order accepted

who is on viagra single packs commercial blonde actress

what is a viagra connect assessment
buy generic viagra viagra-generics.us buy generic viagra
cialis levitra viagra which is best

generic cialis fake

cialis 10 mg durata

https://ciatrusstedonline.com/ - enter site branded cialis
acheter cialis en ligne canada

enter site branded cialis

good choice cialis transdermal

cialis la svizzera

https://ciatrusstedonline.com/ - cialis coupon 30 tablets free
cialis aspirina

cialis for daily use dosages

erfahrung mit cialis kauf usa

potenzmittel cialis preis

https://ciatrusstedonline.com/ - buy generic cialis
cialis 20mg preis billig

cialis generico en chile

comprar cialis lill

cialis 5mg vs 20

https://ciatrusstedonline.com/ - cialis jovene
comprar cialis en bilbao

cialis levitr

inventor of viagra

You made some decent points there. I looked on the net for more info about the issue and found most people will go along with your views on this web site.

imitation viagra

I every time spent my half an hour to read this web site's articles or reviews every day along with a mug of coffee.

if viagra doesnt work will cialis

viagra before and after
generic viagra
how is cialis different from viagra

what is the difference between levitra and viagra

I've been surfing online more than 3 hours today, yet I never found any interesting article like yours. It's pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the internet will be a lot more useful than ever before.

qfsprrbi

when is the best time to take a viagra pill

why doesn't viagra work for my husband
viagra generic
viagra walmart

trump viagra

how to take viagra blue pill
viagra for sale without prescription
generic viagra (sildenafil citrate) 100mg directions

cheap viagra srfdevrddxMitsFlilexnj

how long does viagra last http://viagraid.com/ - viagra price viagra vs cialis cheap viagra generic viagra walmart

viagra not covered by insurance

viagra pill for sale
viagra generic viagra-generics.us generic viagra
50 mg of viagra

cdvrvtjd

buy cialis online germany

does cialis professional work

https://ciatrusstedonline.com/ - generic cialis
i use it prices online cialis

cialis kaufen rezept

overnight viagra

viagra professionnel inde

cialis generika gnsti

cialis sublingual refill pack

https://cialtrustphal.com/ - cialis online
buy cialis online

generic cialis rx cheap

how often can you take a viagra

viagra gelato
generic viagra
how to get a viagra sample

50mg generic cialis

can i order cialis on line

https://cialtrustphal.com/ - online cialis
5 mg cialis buy

cialis vente internet canada

prix cialis en espagne

cialis heart disease

https://ciatrusstedonline.com/ - generic cialis
cialis

achat rapide cialis

buy levitra viagra

a75621 can 40 mg cialis hurt me

[url=http://cialisuqwc.com/]generic cialis[/url]

hay cialis de 100mg

[url=http://cialisuyew.com/]generic cialis online[/url]

cialis sales online pro

[url=http://cialisyytr.com/]online cialis[/url]

generic viagra forum

can i get viagra in vancouver canada
viagra generic http://viagra-generics.us/ viagra generic
taking viagra recreationally

cialis sale 1mg

cialis prix sconto

[url=https://ciatrusstedonline.com/]cialis se puede comprar[/url]
comprar cialis en puerto rico

cialis levitr

potenzmittel cialis preis

cialis aspirina

https://ciatrusstedonline.com/ - dosage for taking cialis
fast delivery cialis sweden

ordini cialis durante la notte

usnqbytv

cialis e levitra onlin

look there cialis super

https://ciatrusstedonline.com/ - where to order generic cialis
cialis

cialis 10mg vidal

where is viagra sold over the counter

where can i buy viagra without prescription
http://viagra-generics.us/# - buy generic viagra
fb viagra penis asstr

ihuwafdi

try it discount drug cialis

cialis e levitra affluss

https://ciatrusstedonline.com/ - usefull link best cialis
online cialis

cialis money order accepted

is viagra covered by government insurance

when will viagra be otc
buy generic viagra viagra-generics.us generic viagra
best viagra for men

viagra meme rest home

how many milligrams in viagra
viagra generic http://viagra-generics.us/ viagra generic
viagra pills walgreens