LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   redirecting http server (https://www.linuxquestions.org/questions/linux-networking-3/redirecting-http-server-334651/)

xowl 06-17-2005 01:48 PM

redirecting http server
 
I know I am lazy...



The situation is:
My university has a proxyed lan, so I cannot enter my U's pc from my home's pc.
I have access to a pc with a real IP (i.e I can ssh it from my house).

I installed webmin on this pc and I can enter it from my house, so I think that ports over 9999 are allowed to enter in this pc.

The question is:
I want to redirect for example the port 10001 of this computer to the http server of my pc, so I can see this http server from my home.

I think iptables will do it, but I don't want to read a complicated manual of iptables.


Anyone knows how to do this??



Thanx in advance

linX

stefan_nicolau 06-17-2005 03:04 PM

It may be overkill, but have you considered an apache reverse proxy running on port 10001 and forwarding requests to the real server?

xowl 06-17-2005 10:21 PM

Quote:

It may be overkill, but have you considered an apache reverse proxy running on port 10001 and forwarding requests to the real server?
It sounds great,... but how can it be done??

Thanx in advance

stefan_nicolau 06-18-2005 04:25 AM

Make sure that mod_proxy is on, and that Apache listens on port 10001
Code:

<VirtualHost *:10001>
<Proxy *:10001>
Order deny,allow
Allow from mynetwork
Deny from all
</Proxy>
ProxyPass / http://www.me.com/
ProxyPassReverse / http://www.me.com/
</VirtualHost>

If you want, I think you can remove <VirtualHost *:10001>.

http://httpd.apache.org/docs/mod/mod_proxy.html for apache 1.3
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html for apache 2.0

NOTE: There may be severe security implications to this setup, as, on the real server, all proxied requests will seem to come from the proxy, not the original visitor. Make sure you have good access control set up on your proxy.


All times are GMT -5. The time now is 12:28 PM.