Discussion Locked

Port Forwading

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Greetings,

I manage to setup port forwarding using rinetd.
I have setup my linux as the webserver gateway
(running apache) and another webserver on NT
(running on IIS) When a request is made to
access pages in NT webserver, the 'rinetd'
service will route the request to NT webserver.
For local gateway (linux) i'm using the default
port, 80. As for the remote host( NT server), i
am using port 81. What i like to achieve here is
that, to avoid users specifying port number whenaccessing URL pages in NT server. I want to have
a virtual ULR for the remote access

For an example if users want to acces pages in
Linux, they can specify www.mylinux.com and as
for accessing NT www.mynt.com. I manage to
create virtual hostname for NT server, but
somehow it did not seem to work. At client
PC, i still have to specify the URL as
www.mynt.com:81 to access the pages in NT server.

Did i miss out some setting ?

The entry in the rinetd.conf
-------------------------------
0.0.0.0 81 126.32.3.16 80
{126.32.3.16 is the NT server ip)

The entry in httpd.conf (/etc/httpd
-----------------------
Listen 80
Listen 81

NameVirtualHost 126.32.3.55:80
NameVirtualHost 126.32.3.55:81

ServerName www.webserv.com.my
DocumentRoot /usr/local/apache

ServerName www.jais.com.my
DocumentRoot /maiwp

Regards,
Uthur

5 replies

by bg4

I may have missed something but why change the NT box to port 81? Both servers can be on port 80 and the user selects by entering www.mylinux.com or www.mynt.com. No need to specify ports.

Hope this helps.

by frank

ok, i assume you do want or have to have both on the same IP, that was why you cam up with the port 80/81 solution...
your rinetd is not the problem... the httpd.conf on the linux is:

Listen 80
NameVirtualHost 126.32.3.55

# Tihs will server pages for www.mylinux.com
# directly from this apache

ServerName www.mylinux.com
DocumentRoot /usr/local/apache

# This will redirect any Requests for www.mynt.com
# to the same IP just port 81
# longer URLs are correctly transformed.

ServerName www.mynt.com
Redirect / http://www.mynt.com:81/

This discussion is closed to new replies.