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

rdmcsyis

buy cialis jelly with no rx

238921 generic cialis 5mg australia

http://cilapharm.com/ - generic cialis

how can i find somebody to do my litearature assingment

https://edpillsnews20.com/ - ed pills

prezzi del viagra generico

cost of 90 viagra pills

https://viagiowow.com/ - does viagra make you hornier
viagra

viagra uk generic

medicinesbuying viagra

much viagra costs india

https://viagiowow.com/ - buy free viagra samples
viagra generic

cuanto viagra debo toma

best liquid viagra

viagra creme pour femme

https://viagiowow.com/ - viagra precios comprar
buy viagra soft paypal payment

viagra for sale amsterdam

comparer les prix du viagra

the cheapest viagra

https://viagiowow.com/ - use viagra twice in 24 hours
viagra cheap

canadian mail order viagra

npyosugr

[url=http://antabused.com/]antabuse prices[/url] [url=http://sildallis.com/]sildalis tablets[/url] [url=http://stromectoliv.com/]stromectol cream[/url] [url=http://ahydroxychloroquine.com/]hydroxychloroquine uk[/url] [url=http://hloroquine.com/]resochin[/url]

aunzreym

[url=https://hydroxychloroquina.com/]hydroxychloroquine sulfate australia[/url] [url=https://sildenaviagra.com/]viagra 100mg cost in usa[/url]

viagra 100 price sams club

achetez le sildenafil viagra

https://viagiowow.com/ - cheap viagra
buy cheap viagra online

viagra basel

preis viagra 100mg pfizer

viagra do i need prescription

https://viagiowow.com/ - buying viagra on line
viagra 85 ans

will viagra go generic

cheap lasix in Finland

purchase lasix
lasix online pharmacy in France best price for lasix in Dallas http://lasifurex.com/ where to buy lasix in Finland online


buy lasix in United States
buy lasix
cost of lasix for dogs
best price for lasix in San Antonio
where to buy lasix in Detroit

best price for lasix in Pittsburgh

purchase lasix from Virginia Beach
top 9 best places to buy lasix in Sweden where to buy lasix in Charlotte online http://lasifurex.com/ buy lasix in New Orleans


lasix delivered overnight
lasix for women
how to buy lasix in San Diego
cheap lasix in Saudi Arabia

viagra free trial canada

viagra richtig einnehmen

https://viagiowow.com/ - only today fda approved viagra
cost of 90 viagra pills

viagra sildenafil rezeptfrei

viagraaustralia online net

viagra for sale new zealand

https://viagiowow.com/ - buy cheap viagra online
viagra uk generic

viagra pharmacy in line

generc viagra discount

viagra for sale be

https://viagiowow.com/ - viagra online
buy viagra

the best site viagra sample

viagra richtig einnehmen

purchase viagra outside us

https://viagiowow.com/ - how to use liquid viagra
just try high quality viagra

fastest way to get viagra

much does viagra cost india

buy viagra in pune

https://viagiowow.com/ - we use it buy viagra online us
the cheapest viagra

venta de viagra en peru

viagra hardon

taken too much viagra

https://viagiowow.com/ - viagra south africa buy
generic viagra

what local stores sell viagra

blue diamond generic viagra

f4d731 generic cialissofttabs

http://cialisuyew.com/ quanto costa cialis originale

https://cialisyrpo.com/

chewable viagra 100mg

a75631 is generic viagra the same

https://viagratodo20.com/ india price viagra dth

http://viagrauyr.com/ generic viagra pills

http://viagrayqdd.com/ viagra in italien rezeptfrei

https://viatrustedonline.com/

nayqoclu

buy lasix without a prescription

purchase lasix from Dallas
where to purchase lasix in Belgium where is better to buy lasix online http://lasifurex.com/ lasix quick shipment


where is better to buy lasix online
cheap lasix in Czech Republic
buy lasix fedex shipping
how much lasix cost
where to buy lasix online
how to buy lasix in Israel
buy lasix in Portugal

buy viagra from uk stockiests

how to use liquid viagra

https://viagiowow.com/ - generic viagra plus priligy
comprar viagra iquique

come viagra onlin

buy viagra online arizona

comparatif viagra com

https://viagiowow.com/ - pharmacie en ligne viagra
generic viagra no prescriptio

viagra for sale be

uk pharmacy online viagra

cost of viagra on the nhs

https://viagiowow.com/ - buy viagra in mumbai cod
buy viagra from uk stockiests

detached retina viagra use

online genetic viagra store

viagra achat en pharmacie

https://viagiowow.com/ - viagra for female price
medicinesbuying viagra

viagra free trial canada

buy viagra cialis levitra

viagra for sale new zealand

https://viagiowow.com/ - buy viagra online
cuanto viagra debo toma

purchase viagra outside us

problems caused by viagra

order viagra and cialis

https://viagiowow.com/ - buy generic viagra online
buy viagra

chemist viagra prices

viagra generico dalla germania

herbal viagra bestellen

https://viagiowow.com/ - buy generic viagra online
the cheapest viagra

medicinesbuying viagra

of tons viagra

excel herbal viagra uk

https://viagiowow.com/ - buy cheap viagra online
viagra

we like it viagra online store

excel herbal viagra uk

viagraaustralia online net

https://viagiowow.com/ - buy generic viagra
how good is 50mg viagra

viagra precios comprar

canadian mail order viagra

prezzi del viagra generico

https://viagiowow.com/ - viagra gel in uk
viagra cheap

cheapest canadian brand viagra

ogvaylpa

[url=https://cipro2.com/]ciprofloxacin 500 mg tablet price in india[/url] [url=https://femalecialis.com/]cialis paypal uk[/url] [url=https://viagrabb.com/]can i buy viagra over the counter in india[/url] [url=https://zoloftm.com/]best zoloft generic[/url]

the best site viagra sample

caremark utc viagra cost

https://viagiowow.com/ - viagra generic
buy viagra

tramadol viagra

bzayshnz

[url=http://proscar365.com/]where can you buy proscar[/url] [url=http://hydroxyhloroquine.com/]hydroxychloroquine 70 mg[/url] [url=http://vardemafil.com/]cheap brand levitra[/url] [url=http://buyhydroxychloroquine.us.com/]hydroxychloroquine sulfate tab 200 mg[/url] [url=http://hloroquine.com/]chloroquine purchase online[/url] [url=http://malegraxt.com/]malegra fxt in india[/url] [url=http://celexamed.com/]citalopram cost usa[/url] [url=http://diclofenacmed.com/]diclofenac pill 50mg[/url]

can women take viagra for men

viagra 50 mg prices

https://viagiowow.com/ - viagra little blue pill
viagra erklrung

viagra preis 100mg generica

viagra gratuit

viagra for female price

https://viagiowow.com/ - how to use liquid viagra
viagra online

viagra cialis simil

eiwzunbu

[url=http://vermoxmebendazole.com/]vermox 100mg tablets[/url] [url=http://cipro2.com/]ciprofloxacin 300 mg[/url] [url=http://tetracycline5.com/]where can i get terramycin[/url] [url=http://accutanr.com/]roche accutane[/url] [url=http://cialisz.com/]canada cialis generic online[/url] [url=http://stromectoliv.com/]stromectol tablets buy online[/url]

lxajwzfn

[url=https://viagrarem.com/]average cost of viagra 100mg[/url] [url=https://furosemide3.com/]lasix brand name[/url] [url=https://valtrexl.com/]valtrex no perscrition[/url] [url=https://cafergotm.com/]generic cafergot[/url] [url=https://buyviagaonline.com/]viagra/canada[/url] [url=https://albendazole911.com/]albendazole price in mexico[/url] [url=https://tadacipmed.com/]tadacip 20 india[/url] [url=https://hydroxychloroquineusa.com/]generic plaquenil[/url] [url=https://tadalafilxr.com/]generic cialis cheapest price[/url] [url=https://zofran911.com/]zofran cost canada[/url]

medication costs 2fted

Awesome content, Thanks! cialis online pharmacy buying prescription drugs canada

viagra by mail

viagra for sale be

le viagra de fakon

https://viagiowow.com/ - buy generic viagra online
comparatif viagra com

best form natural viagra

enpxcmxz

[url=https://flagyl911.com/]flagyl capsule[/url]

Miami Business Lawyer

Great and reliable legal team here!. Miami Business Lawyer

jjxunbkg

[url=http://tadacipmed.com/]tadacip 20 mg price in india[/url] [url=http://aralen.us.org/]chloroquine order[/url] [url=http://duloxetinecymbalta.com/]cymbalta[/url] [url=http://buyhydroxychloroquine.us.com/]plaquenil generic brand[/url]