Click to See Complete Forum and Search --> : ipmasqadm portfw - broken?


nanode
12-06-2000, 02:08 AM
I recently reinstalled Slackware 7.1
I was careful to backup config files and scripts and restored them after reinstalling.

ipchains seems to be working just fine, but I was forwarding 3 ports to another box on my 192.168.0.x subnet.

ipmasqadm portfw -a -P tcp -L 206.191.148.186 21 -R 192.168.0.10 21
ipmasqadm portfw -a -P tcp -L 206.191.148.186 2222 -R 192.168.0.10 22
ipmasqadm portfw -a -P tcp -L 206.191.148.186 50542 -R 192.168.0.10 23


portfw seems to be working:

root@stout:~# ipmasqadm portfw -l
prot localaddr rediraddr lport rport pcnt pref
TCP yunt.net ale 50542 telnet 9 10
TCP yunt.net ale 2222 ssh 10 10
TCP yunt.net ale ftp ftp 2 10


FYI: ipchains is NOT filtering those ports at all and there are no services running on the firewall box at those ports.

Why would this stop working like it did?

Thanks

Fandelem
12-06-2000, 04:52 PM
well, from looking at the portfw rules, it looks like you are having 206.191.148 listen on port 2222 and then redirect it to 192.168.0.10 on port 22, which your SSHD is listening on (and installed, hopefully!).

it also looks like you are having 206.191.148.186 listen on port 50542 and redirecting it to 192.168.0.10 on port 23, which your TELNETD is listening on (and installed, hopefully!).

if you are not specifically specifying when you are *testing* (or connecting any other time) those ports (2222 and 50542) then it will not work. I'm asusming this is for safety purposes?

if this all is okay and well - then you should check WHERE you are putting these rules - remember, put priority first - which these are - so put them up at the top of your rules :}

regards,

~kyle

[This message has been edited by Fandelem (edited 06 December 2000).]