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

when does viagra patent expire in us

how often many times can you get erection from viagra
viagra generic viagra-generics.us viagra generic
can young men take viagra

ikazdfcggjfhfgMitsFlileuzd

herbal viagra https://gopharmxx.com/ - what does viagra do online viagra over the counter viagra otc viagra

cash advance on lapalco

cc0031 cialis side effects men

http://cialisyytr.com/ cialisjelly online

http://ciaviagogogo.com/ uk cialis fast delivery

http://cilapharm.com/

cost of viagra in 2019

mexico viagra online
viagra generic http://viagra-generics.us/ viagra generic
cia used viagra to bribe afghan

buy female viagra online

what do i need to do to get cialis or viagra
http://viagra-generics.us/# - viagra generic
buying viagra

buy generic 100mg viagra online srfvrddxMitsFlilexkl

cialis vs viagra https://mymypharmacy.com/ - viagra generic name viagra online viagra buy generic 100mg viagra online

buy a viagra without

vendo viagra cialis madrid

https://viagrabuyggfd.com/ - comprar viagra sevill
have any 3800mg viagra

pfizer viagra patent uk

proper viagra dosage

6e4731 i recommend viagra best buy

http://viagrayqdd.com/ viagra genrico mxico

http://vigraweuy.com/

where to buy real viagra cheap

viagra effects how long
generic viagra https://viagra-generics.us buy generic viagra
cuanto dura el efecto del viagra

viagra commercial lady

Greetings from Colorado! I'm bored to tears at work so I decided to check out your blog on my iphone during lunch break. I really like the knowledge you present here and can't wait to take a look when I get home. I'm shocked at how fast your blog loaded on my cell phone .. I'm not even using WIFI, just 3G .. Anyways, awesome blog!

cialis vs viagra srfvrddxMitsFlilenvl

viagra generic name https://mymypharmacy.com/ - generic viagra viagra alternative buy viagra generic viagra online

ozljxqpq

uk online pharmacy viagra

how to buy viagra in abu dhabi

[url=https://viagrabuyggfd.com/]buy viagra bkk[/url]
viagra

follow link sales viagra

viagra limited india

411631 cialis professional uk barata

https://cialistodo2020.com/ cialis levitra combination

http://cialisuqpor.com/ cialis 20mg schweiz

http://cialisuqwc.com/

tips to win essay writing competition wit

essay about healthy lifestyle http://essaywritercpl.com/ - fce writing part 2 essay examples essay writer university level essay introduction example

buy cheap online cialis soft

5f7531 sconti di farmacia di cialis

http://cialisyytr.com/ 1st rx orders cialis generic

http://ciaviagogogo.com/ cialis alcoo

http://cilapharm.com/

uk is delivery

commander is 10

9d11 law school assignment help

9d11 loan personal bad credit

9d11

viagra oklahoma

viagra professional pfizer

https://viagrabuyggfd.com/ - acquistare viagra in germania
viagra cheap

trial viagra free

sciatica viagra

whats in viagra ingredients
buy generic viagra https://viagra-generics.us buy generic viagra
where can i buy real viagra online

waiting time for viagra

medicare part d plans texas which cover viagra
buy generic viagra http://viagra-generics.us/ buy generic viagra
viagra for sale canada

buy a viagra without

buy a viagra without

https://viagrabuyggfd.com/ - buy generic viagra
where can i buy viagra jelly

viagra price of one tablet

kelly hu viagra commercial

how common is blindness from viagra
generic viagra https://viagra-generics.us generic viagra
mixing viagra with oxicontin

prix de cialis nz

how use viagra to

viagra online

buy viagrawhat store sells viagra

viagra online

buy viagra

viagra drug test

how often should you use viagra
buy generic viagra
viagra information

dkllvxkv

[url=https://indocinrx.com/]medicine indocin 50 mg[/url] [url=https://arimidex365.com/]arimidex for sale us[/url] [url=https://azithromycinp.com/]azithromycin 500mg buy[/url] [url=https://zofranondansetron.com/]zofran rx[/url] [url=https://priligydapoxetin.com/]buy dapoxetine online usa[/url] [url=https://albenzamed.com/]albenza for pinworms[/url]

topical viagra

is there a difference between female vkagra and male viagra
when is viagra patent up
do you stay hard after coming on viagra

viagra dosage srfvrddxMitsFlilecwi

cheap viagra https://mymypharmacy.com/ - viagra pills cheap viagra viagra viagra vs cialis

enter site best cialis prices

cialis us online pharmacy

[url=https://cialisyrpo.com/]cialis next day shipping[/url]
generic cialis

cialis comprar recet

viagra come ordinare

counter the over viagra

online viagra

buy viagracan viagra kill you

buy viagra

viagra sale

what colour is viagra tablet

what is the cost of viagra without insurance
buy generic viagra
generic viagra 200mg

men try this tonight and you ll never need viagra again

viagra super active plus
buy generic viagra viagra-generics.us generic viagra
how much is 100mg viagra

what does viagra do if you don't have ed

viagra prescription
http://viagra-generics.us/# - buy generic viagra
which tamil director took lot of viagra and died

viagra generico opinioni

only today viagra dose

https://viagrabuyggfd.com/ - viagra generico para comprar
buy viagra

viagra average dose

ikazdfcggjfhfgMitsFlileiit

cialis vs viagra https://gopharmxx.com/ - viagra vs cialis viagra 100mg online viagra viagra 100mg

we choice viagra rx in canada

viagra average dose

https://viagrabuyggfd.com/ - generic everyday viagra
viagra cheap

viagra for women on online

viagra and what can cause a heart attak

which is more effective viagra or cialis
generic viagra https://viagra-generics.us generic viagra
viagra canadian pharmacy reviews

viagra usage

generic viagra soft tabs
buy generic viagra
viagra generic

tolerance to viagra

how does viagra affect afib
http://viagra-generics.us/# - buy generic viagra
travel canada with viagra

should i take a 50 or a 100 mg viagra pill

pharmacy canada viagra
generic viagra
woman have sex on viagra video

academic essay writing examples wit

sat essay score
great essay writers
essay for ielts general with answers
essay writing service
easy essay plan template

how to get viagra pills

discount viagra
what is the maximum dose of viagra you can take
why cant i get hard with viagra

sat essay score for stanford wit

speech essay example spm http://writemyessayzt.com/ - comparison contrast essay examples middle school write that essay essay book pdf in english

buy generic 100mg viagra online srfvrddxMitsFlilelco

women viagra https://mymypharmacy.com/ - buy viagra viagra and alcohol viagra canadian pharmacy ezzz viagra cost