The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Redirecting port requests 12 July 1998
Need more help on this topic? Click here
This article has 2 comments
Show me similar articles
This example shows you how to redirect incoming http requests to a machine on your internal LAN.  You could also use this method to redirect telnet, ftp, etc.

The www uses the http protocol.  I run MS FrontPage 98 on NT1.  I wanted to redirect http requests from the gateway machine to the web server on NT1.  It was pretty easy, but a few hurdles along the way.

Please note, that this was for my testing and education only.  I don't intend to continue to redirect such requests.  But I wanted to try it.  Just to see.   Eventually, I plan to add http to my gateway machine as yet another place to publish my webpage.

Looking at the natd manual, it shows that redirect_port is the command line option to use.  I added the following line to my natd.conf file.  Please note, the IP address has been changed for security reasons.

redirect_port tcp 111.222.333.444:80
redirect_port ucp 111.222.333.444:80

And I tried to access the page from my own subnet.  But I couldn't.  So I jumped on EFnet IRC Network #freebsd to verify my solution.  I received confirmation that what I was doing was correct.  And to as a test, it was suggested that I get an external shell and try that.  External shell?  What's that?

In the end, my helper asked for the URL and they tried it.  No luck.

Brain wave!

Filter rules.... kill the filter rules.  I cleared out the filter rules and asked him to try again.  This time, success!


Need more help on this topic? Click here
This article has 2 comments
Show me similar articles