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

ivermectin pills for humans

ivermectin buy online ivermectin australia

plavix and cialis taken together

cialis overnight no pe

gtrviagraok.com War743610974

best canadian mail order pharmacies best male performance supplement viagra used for pulmonary hypertension cheapest viagra walmart pharmacy refill request crestor side effects cvs pharmacy drug price list

acitive ingredient in cialis

manufacturing pharmaceutical company for cialis

Cialis Ocupa Receta Medica

long half life of cialis

http://buyzithromaxinf.com/ - zithromax online canada

erctqnqms

[url=https://bestpillshop.com/]synthroid 0.05 mg[/url]

fgvotumd

pwjbycay

children cialis tadalafil

http://buyzithromaxinf.com/ - get valtrex overnight

how soon cialis have effect

stromectol tablets buy online

stromectol canada ivermectin pills for sale

libawfoq

RIshikesh Escort Service

nsrlhskawo

gay men buy cialis

cialisgap.com War556777972

medicare plans with prescription coverage walgreens male enhancement products cvs coupon policy cialis alternative cbd interactions with other medications libido herbs

taking cialis cause eye discharge

Order Misoprostol Online

cialis coupon cialiswithdapoxetine.com

cialis alternative https://cialiswithdapoxetine.com/# - cialis pills

cialisgap.com War692299235

rx drug card reviews viagra cvs pharmacy cialis lilly viagra official website generic viagra next day delivery pectin side effects body

cialisgap.com War 584983439

sildenafil savings card generic ed pills from india products not approved by fda cheapest cialis uk post menopausal loss of libido best deal on viagra 100mg the best meds for ed

cialis retail price in ct

Ed Pills Online Legal

jsqkjtys

[url=http://hydroxychloquinenova.com/]hydroxychloroquine 200mg[/url] [url=http://genericviagrapl.com/]viagra online pills[/url] [url=http://tadalafilvmed.com/]tadalafil 60 mg uk[/url] [url=http://viagraxd.com/]buy viagra 25mg[/url] [url=http://ivermectintbs.com/]ivermectin cost[/url] [url=http://viagrahim.com/]discount viagra canada[/url] [url=http://ordercialistablets.com/]cialis online canada[/url] [url=http://bestivermectinforsale.com/]stromectol over the counter[/url] [url=http://viagragenerictabs.com/]where can i buy real viagra[/url] [url=http://bestcialispills.com/]female cialis canada[/url]

cialisgap.com War129039482

where can i buy contrave online deals on viagra or cialis cialis usa male oral contraceptive pill what does viagra mean nexium samples for physicians

viagra and cialis dosage

cialis interaction with alcohol

health risks of sewage odors

ulruwclnli

viagrarover.com War 881289424

what does sildenafil cost pink pill women cheap vigora german technology india viagra sample how to take viagra best price for generic cialis how does viagra work

cheapest levitra cialis viagra

Tomar Cialis Ocasionalmente

ddkdanln

[url=https://hydroxychloquinenova.com/]plaquenil 200mg price[/url]

lkkplnutx

Such A Good Neighbor

We spent a lot of time at her home. Maybe so her mother could keep an eye on us. Mrs. Spencer made sure to be around, offering drinks, snacks, chit chat. I noticed that she was fairly young herself. Granted at my age, anyone over 25 was old, but she was probably mid-30s, divorced. If she was a indiction of how Carley would develop, maybe I should wait. Mrs. Spencer had fuller breasts and a nice butt. She appeared to be in great shape for her "advanced" age. I knew she was keeping an eye on me as much as I was on her and her younger daughter. Her eldest, Sharon was away at college at the time. With Mrs. Spencer around we mostly limited ourselves to holding hands and sneaking in a few light kisses. One day Mrs. Spencer caught us by surprise walking in as I'd slid my hand up from Carley's stomach to rub her right breast through her shirt. She didn't really need a bra yet, so I could feel her nipple, hard, through her shirt. Just this much contact had me hard also.

https://sites.google.com/view/L9P0g5wPy5rZlkW4 https://sites.google.com/view/4rRowLbWYDnBT05y

cijfqvap

bph cialis

Is 100 Mg Cialis Safe

mixing cialis and viagra

cialis professional thailand

fsylnafvkm

cialis 20 mg cialiswithdapoxetine.com

buy cialis online https://cialiswithdapoxetine.com/# - buy cialis usa

cialis free samples

Priligy Cream

uobeksze

[url=https://ivermectinv.com/]price of ivermectin[/url]

cialis pen

https://buylasixshop.com/ - furosemide davis pdf

cialis depression