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

TyJ pi ishvOEu

discover personal loans contact https://www.personalloans02.com personal loans houston.
online play casino https://onlinecasinonodeposit002.com best online casino promotions.

v57dgiy q25xrv

Kudos. I value it. buy verampil online online canadian discount pharmacy

viagra soft tabs best price

acheter viagra belgique

https://viagraviagra20.com/ - low cost viagra in the usa
viagra

best prices on viagra 100mg

viagra cialis dann

generic viagra sites

https://viagraviagra20.com/ - cheap viagra prices pharmacy
viagra tiempo de efecto

canada online viagra

dgwqajds

ykuxhaie

how to get free viagra sample

can i take ramipril and viagra

https://viagraviagra20.com/ - generic viagra
low cost viagra in the usa

viagra side effects webmd

can i take ramipril and viagra

viagra to buy online australia

https://viagraviagra20.com/ - trouver du viagra pas cher
can buy viagra over counter us

female viagra generic usa

sale clomid now online

Thoughtfully dickens generic viagra online kennels maintain clomid au buy online resolve paper money Over the hill In towards the hospital.

srdninro

TGi Df HgWOJwq

navy federal personal loans www.personalloans02.com interest rates on personal loans.
online casino real money paypal usa onlinecasinonodeposit002.com best online casino usa real money.

viagra interdit

buy viagra reviews

https://viagraviagra20.com/ - viagra cost in hyderabad
buy generic viagra online

viagra fort lauderdale

denver case search

avbudlkpwnsq judiciary case search md
epcounty com civil case search [url=http://marylandjudiciarycasesearchs.com/]bell county civil case search[/url] riverside county superior court case search cook county circuit court case search

viagra side effects webmd

la mejor viagra

https://viagraviagra20.com/ - 120mg viagra
viagra vs cilias

dose maximale viagra

viagra quebec ville

follow link how to get viagra

https://viagraviagra20.com/ - viagra online strafbar schweiz
just try buy viagra us

discount pill viagra

viagra online swiss

female viagra for men

https://viagraviagra20.com/ - generic viagra
buying viagra on line

generico para viagra

viagra online swiss

we use it buy cialis viagra

https://viagraviagra20.com/ - viagra buy pharmacy iframe
viagra

no prescription viagra

cobra viagra

viagra california

https://viagraviagra20.com/ - best viagra price online
viagra generic

cialis o viagra foru

viagra genaric medikament

female viagra generic usa

https://viagraviagra20.com/ - online viagra get to
viagra online swiss

viagra 100mg in croatia

viagra genaric medikament

viagra package insert

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

generic viagra sites

effetti viagra sangu

viagra plus overnight pharmacy

https://viagraviagra20.com/ - we use it buy cialis viagra
buy generic viagra

manufactures generic viagra

baltimore case search

xeaycqatbvog www.iowacourts.gov case search
broward county clerk of courts civil case search sacramento court case search odyssey case search washington search case records

o284wuo n87idq

Appreciate it, Plenty of facts!
super p force without a doctor prescription canada drugs online

howmuchviagraissafetotake

spyware buy viagra dose

https://viagraviagra20.com/ - generic viagra
viagra cheap

viagra bestellen preise

pa judicial court case search

wcfqujexftgt franklin county common pleas case search
georgia case search website king county court cases search michigan court cases search montgomery county criminal case search

viagra 25 vademecu

buy viagra free shipping

https://viagraviagra20.com/ - no2 viagra
viagra cheap

best viagra price online

sublingual canada does viagra

forum where to buy viagra

https://viagraviagra20.com/ - buy generic viagra online
viagra india tablets price

viagra billigst

texas judiciary case search by name

yjuroczzobgq palm beach clerk of courts case search
stearns county criminal case search court case search wa pennsylvania courts online case search tulare county superior court case search

pennsylvania criminal case search

xkvhufwyksdt search for bankruptcy case
superior court of california county of los angeles case search [url=http://marylandjudiciarycasesearchs.com/]palm beach county clerk of courts case search[/url] san bernardino county case search wayne county case search

o67cflw y121em

Nicely put, Thanks a lot! albenza sale approved canadian online pharmacies

t91dpkh v966nn

Nicely put. Kudos! effexor xr online rx online

we use it buy cialis viagra

cheap generic viagra co uk

https://viagraviagra20.com/ - natural viagra pharmacy online
comprar viagra sin receta

viagra generico mexico

ddlmqjuu

[url=http://ahydroxychloroquine.com/]plaquenil tabs[/url] [url=http://finpeciax.com/]generic finpecia[/url] [url=http://viagrachem.com/]can i buy viagra in canada over the counter[/url] [url=http://sildenafilsub.com/]order sildenafil tablets[/url]

buy generic gel viagra online

viagra e cialis levitra

https://viagraviagra20.com/ - follow link how to get viagra
buy viagra online

viagra 50 mg fonctionnement

does aetna cover viagra

i use it buy viagra generic

https://viagraviagra20.com/ - buy viagra online
spyware buy viagra dose

pfizer viagra coupons

zqyvhwhd