Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: Remote portforwarding and virtualhost

Subject: Re: Remote portforwarding and virtualhost
Date: Tue, 20 Jun 2006 13:22:45 -0700
for Name based virtual hosting, there is only one IP address and one port.

So, you just need one tunnel.
You will need entries in your host table (/etc/hosts on Unixes) that
point to 127.0.0.1.
You will also need to make sure that there are no absolute links in
the site, unless
you move the local port to 80 (which requires the ssh from the local
root account on
Unixes.)

Name based virtual hosting uses the "Host:" HTTP header to key which
virtual host
the query routes to.  This head is filled in by the browser using the
host part of the
URL entered.

On 6/19/06, Logu <logsnaath@gmx.net> wrote:
>> I have a machine with  a public IP. I want to remote
>> portforward one of the webserver port (80) to this machine.
>> The webserver is apache with 5 virualhosts. If I forward the
>> connection to the public IP machine, I am not able to get the
>> corresponding webpages from the virtualhosts. Instead I am
>> getting all from one virtualhost. Is there a way to
>> distinguish the virtualhost while forwarding. ?
>>
>> There is no problem with the apache configuration as I am
>> getting the correct pages from the localnetwork.
>>
>> ssh -g -R 8080:v1.local.com:80 publicIP
>> ssh -g -R 8081:v2.local.com:80 publicIP
>> ssh -g -R 8082:v3.local.com:80 publicIP
>
> What kind of virtual hosts are you using?
>

I am using Name based virtual host (ie.,  v1.local.com,  v2.local.com  and
v3.local.com resolve to same IP).

-logu




--
And, did Guloka think the Ulus were too ugly to save?
                                        -Centauri

<Prev in Thread] Current Thread [Next in Thread>