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

b7lzmaer

wh0cd34221 [url=http://propecia365.us.org/]finasteride no prescription[/url] [url=http://vasotec4you.us.com/]vasotec[/url] [url=http://cialis50.us.com/]price comparison cialis[/url] [url=http://cialis18.us.com/]cialis 5mg price[/url] [url=http://diclofenac4you.us.com/]Diclofenac[/url] [url=http://lexapro911.us.com/]Lexapro[/url] [url=http://levitra4you.us.com/]levitra 10mg[/url] [url=http://diflucan4you.us.com/]buy generic diflucan[/url] [url=http://metformin4you.us.com/]metformin er 500 mg[/url] [url=http://bactrim365.us.org/]buying bactrim antibiotic online[/url]

3s64p5qc

hfgqviwl

37h3khgd

rbn4u7i1

p7z5memy

wh0cd34221 [url=http://sildenafil18.us.org/]SILDENAFIL CITRATE[/url] [url=http://cipro4you.us.com/]purchase ciprofloxin[/url] [url=http://wellbutrin4you.us.com/]wellbutrin 300mg[/url] [url=http://estrace4you.us.com/]estrace cream price[/url]

d8nlxi8u

wh0cd34221 [url=http://propecia365.us.org/]propecia online pharmacy[/url] [url=http://doxycycline365.us.org/]where can i get doxycycline[/url] [url=http://ventolin365.us.org/]ventolin inhaler non prescriptio[/url] [url=http://sildenafil18.us.com/]sildenafil[/url] [url=http://ventolin911.us.com/]Ventolin[/url]

0xoz5wzr

wh0cd34221 [url=http://trazodone4you.us.com/]trazodone hcl[/url] [url=http://doxycycline365.us.org/]doxycycline 50mg[/url] [url=http://kamagra911.us.com/]kamagra 100mg oral jelly[/url] [url=http://kamagra4you.us.com/]kamagra[/url] [url=http://clindamycin4you.us.com/]clindamycin[/url] [url=http://zoloft4you.us.com/]zoloft[/url] [url=http://medrol4you.us.com/]Medrol[/url] [url=http://kamagra365.us.org/]kamagra[/url] [url=http://furosemide4you.us.com/]Furosemide[/url] [url=http://diflucan4you.us.com/]Diflucan[/url]

apuncole

personal loan payday loans nevada people with bad credit personal loan

uqlswcsl

car insurance quotes comparison car insurance comparison car insurance quotes in texas best and cheapest car insurance

virgin online casino zrw

4brymwre

wh0cd34221 [url=http://motilium365.live/]motilium[/url]

aronymn

viagra 5mg
buy viagra online
viagra cost per pill
generic viagra online

awrtqt17

wh0cd44378 levitra

Beano

cialis order
buy cialis online
cialis professional online
generic cialis

4o9vg15e

wh0cd55870 sildenafil

Waw349503935

http://www.breezeavenue.com/__media__/js/netsoltrademark.php?d=vulkanklu... http://rok.bitrixlab.ru/bitrix/redirect.php?event1=catalog_out&event2=http://www.dorogibezproblem.ru&event3=Дороги+без+проблем&goto=https://vulkanklub777.ru http://arc.hec-global.net/redirect?ticket=A3poBVVc4vQJ44KmGBLyUYf4MiTbLv... http://www.cingalshot.com/__media__/js/netsoltrademark.php?d=vulkanklub7... http://212.118.48.154/SiteDetails.aspx?url=vulkanklub777.ru http://samflax.biz/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://wwwchicagosuntimes.org/__media__/js/netsoltrademark.php?d=vulkank... http://monsterlinks.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://www.hyipnetwork.net/allhyipmonitor/goto.php?url=https://vulkanklu... http://americanlawnsprinklerco.com/__media__/js/netsoltrademark.php?d=vu... http://home.dongyang.ac.kr/~sagewide/index.files/Page327.html?a<>=Игровые автоматы http://www.kuwaitisation.com/__media__/js/netsoltrademark.php?d=vulkankl... http://today.lg.ua/redirect.php?url=http://vulkanklub777.ru http://lapachanga.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://lyze.jp/jmp?url=https://vulkanklub777.ru http://www.minimum-price.ru/bitrix/rk.php?goto=https://vulkanklub777.ru http://youthbuildpennsylvania.org/__media__/js/netsoltrademark.php?d=vul... http://adunare.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://get-inthehole.com/mt/mt4i.cgi?cat=6&mode=redirect&ref_eid=659&url... http://vintagebusty.net/crtr/cgi/out.cgi?id=189&url=https://vulkanklub77... http://warpcentral.info/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://danielhernandezcpa.com/__media__/js/netsoltrademark.php?d=vulkank... http://dorothy-herman.org/__media__/js/netsoltrademark.php?d=vulkanklub7... http://quotashare.biz/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://www.explorelvc.com/redirect?SessionGuid=fca718bf-9e12-4633-a889-1... http://ecoportal.su/go.php?rasd=all&url=vulkanklub777.ru http://www.maturesexpussy.com/cgi-bin/atx/out.cgi?id=358&tag=top&trade=h... http://doll-a-rama.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://mustiquecompany.com/__media__/js/netsoltrademark.php?d=vulkanklub... http://oliveoilmill.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://ppgadvisors.co.uk/__media__/js/netsoltrademark.php?d=vulkanklub77... http://moneypal.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://ppagina2.enviodenews.com/registra_clique.php?id=TH|teste|105495|7674&url=https://vulkanklub777.ru http://davethompson.org/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://loftcleaning.com/__media__/js/netsoltrademark.php?d=vulkanklub777.ru http://movie.qkyoku.net/out.cgi?id=11145&url=https://vulkanklub777.ru http://gorod-tula.ru/widgets/outside/?url=http://vulkanklub777.ru/ http://www.nkez.net/Link/Index.asp?action=go&fl_id=9&url=https://vulkank... http://www.tubefucksluts.com/cgi-bin/atx/out.cgi?id=150&tag=toplistbtm&t... http://www.orphus.ru/redir.php?http://vulkanklub777.ru http://www.irwebcast.com/cgi-local/report/redirect.cgi?url=https://vulka... http://balinter.net/redirect/banner.php?redir=vulkanklub777.ru http://www.centerpointentex.biz/__media__/js/netsoltrademark.php?d=vulka... http://www.enquetes.com.br/popenquete.asp?id=73145&origem=https://vulkan... http://artandsouldesign.com/__media__/js/netsoltrademark.php?d=vulkanklu... http://d-click.pressconsult.com.br/u/9312/1051/73941/1265_0/25bbe/?url=h... http://www.stocknaked.com/__media__/js/netsoltrademark.php?d=vulkanklub7... http://szikla.hu/redir?url=https://vulkanklub777.ru/ http://www.visitorsdetective.com/profile/vulkanklub777.ru/en/ http://tienda-eco.com/redirect.php?url=http://vulkanklub777.ru

rbp47a53

uqguqan6

33efepxk

khmrao17

qsy4zefs

kb7fnfw3

on42x658

cuccect

viagra nasal congestion
buy generic viagra
viagra vs cialis reviews
buy generic viagra online