Dear all,

Thanks to Trevor for his link. I have found what I needed to setup the
port forwarding function. However, seems I still cannot solve my problem
with this setting in place.

This "ipchains" machine is also my ADSL gateway to the Internet, thus it
also runs NAT (masquerading). I needed to setup such that when some
machines inside the local LAN try to initiate a TCP connection to a
specific port on a specific external host, it would be port forwarded to
another port of the same machine. For example, when a local machine try
to connect to "123.1.1.1" at port "1234", I want it to be redirected to
"123.1.1.1" at port "5678".

I have tried the following command sequences :
> ipchains -F
> ipchains -A forward -s 192.168.1.0/24 -d 0/0 -j MASQ
> ipmasqadm portfw -f
> ipmasqadm portfw -a -P tcp -L 123.1.1.1 1234 -R 123.1.1.1 5678

but it didn't work as I expected. IP_FORWARD has been turned on already.

>From what I observed, all outgoing packets via this gateway will just get
through with the Masquerade rule but skipped the port forwarding rule.
Any idea and suggestions are highly welcomed.

Also, to Hiten, what's this REDIR that you mentioned ? An RPM package or
an option within ipchains command ?

Regards,
Raymond Fung.


Hiten Desai wrote:

> --- Trevor <[EMAIL PROTECTED]> wrote:
> > Raymond,
> >
> > <http://www.monmouth.demon.co.uk/ipsubs/portfw-2.2.html> contains
> > excellent
> > information on how to use  ipchains to portforward packets.
> >
> > Trevor
> > <http:/www.gnuguy.com>
> >
> >
>
> you can also use REDIR it works great on my rhl 6.2
> without messing with the kernel issues if u go for ipchains or
> anything else
>
> Hiten.
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> --
> redhat-list mailing list
> unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
> https://listman.redhat.com/mailman/listinfo/redhat-list



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to