/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! 
/* ALSO: Don't quote this header. It makes you look lame :-) */


Valerij Kovzan wrote:

> It's ok forwarding external IP & port to internal hosts, e.g.:
> 
> ipmasqadm portfw -a -P tcp -L 192.168.2.254 1111 -R $host_on_internet 1111
> ipmasqadm portfw -a -P tcp -L $local_extip 25 -R 192.168.2.5 25
> 
> ipchains -A forward -d 192.168.2.254 1111 -p tcp -j ACCEPT
> 
> ipchains -A forward -d $local_extip 25 -p tcp -j ACCEPT
> ipchains -A forward -s 192.168.2.0/24 -j MASQ
> 
> So if internet hosts go to port 25 on $local_extip then address properly
> masquaraded and
> forwarded to internal host but when I go to local internal ip address port
> 1111 it doesn't masquarade internal host whith $local_extip going to
> $host_on_internet 1111.
> 
> acctually I have read in manuall and howto that ipmasqadm portfw work
> to internal hosts but may be there should be some overcome....

port forwarding relies on masquerading so what you want won't work.
you need a more general port redirector like redir or netcat or fpipe.
or you could perform static nat using ip from the iproute2 package.
or you could use iptables on a 2.4 kernel.

raf

_______________________________________________
Masq maillist  -  [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- 
THIS INCLUDES UNSUBSCRIBING!
or email to [EMAIL PROTECTED]

PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.

Reply via email to