0

I am trying to block some ports on an embeded uClinux· The Iptables version is 1.4.2. The command I used was

iptables -I INPUT -p tcp --dport 22 -j DROP

But it seems that iptables 1.4.2 is not supporting --dport The result of command is

iptables: No chain/taget/match by that name

If I am removing --dport 22 from command then the rule will be added without problem and I can see it with iptables -L. I wonder if --dport was supported by iptables 1.4.2. If not then is there a way to block ports in version 1.4.2. Another questions is where I can find manuals for old versions of iptables. My last questions is if there is a way to have iptables rules persistent without using iptables-persistent. It is possible to write a script to be run when system is starting but I thought maybe there is a configuration file that we can write permanent rules inside it.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Govan
  • 103
  • 2

1 Answers1

0

The problem was that the right module was not loaded. xt-tcpudp should be loaded with

insmod xt-tcpudp

to be able to add rules containing --dport and --sport

Govan
  • 103
  • 2