The FreeBSD Diary
Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link.
Redirecting port requests 12 July 1998
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.
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.
Filter rules.... kill the filter rules. I cleared out the filter rules and asked him to try again. This time, success!