Re: Port forwarding
"Steven J. Yellin" <[email protected]> Fri, 17 May 2002 14:11:49 -0700 (PDT)
| Newsgroups | gmane.linux.redhat.release.zoot |
|---|---|
| Message-ID | <Pine.LNX.4.44.0205171400420.15467-100000@ucsba1.SLAC.Stanford.EDU> |
On Fri, 17 May 2002, Richard Doust wrote:
> Hi. I'm running RedHat 6.2 and would like to set up my box to forward
> requests that come in on port 80 to port 8080. I don't know how to do this.
> I've tried looking on the web for instructions but haven't found any that
> don't assume I'm a Linux pro, which I'm not. I have a hard time remembering
> from one time to the next when I sit down at the console how to do anything.
> Can anyone help me?
> Thanks in advance.
>
I assume your kernel is what you get when you don't do anything
special, in which case it has the ability to make firewalls, and I assume
that since you claim not to know much, you don't use that feature. And I
assume the ipchains rpm has been installed (probably when you installed
RedHat 6.2). If I'm right, the command given by root "/sbin/ipchains -L"
will show
Chain input (policy ACCEPT):
Chain forward (policy ACCEPT):
Chain output (policy ACCEPT):
which means the firewall is there, but does nothing. If you type
/sbin/ipchains -I input --proto TCP --dport 80 -j REDIRECT 8080
then "/sbin/ipchains -L" will show the new rule, and I think the effect
will be what you want. "/sbin/ipchains-save > /etc/sysconfig/ipchains"
will make the current setup the default when your machine is rebooted,
and "/sbin/ipchains -F" will restore your firewall to what I expect you
to find initially with "/sbin/ipchains -L".
--
Steven Yellin