IP Tables configuration issue


I’m seeing the below message when I try to run " sudo iptables -A INPUT -p tcp --8082 -s -j ACCEPT"

Here are the steps I implemented on all three apps ( stapp01, stapp02, stapp03)

sudo yum install –y iptables-services

systemctl enable iptables

systemctl enable ip6tables

sudo systemctl start iptables

sudo systemctl start ip6tables

tony@stapp01 ~]$ sudo iptables -A INPUT -p tcp --8082 -s -j ACCEPT
iptables v1.4.21: unknown option "–8082"
Try `iptables -h’ or ‘iptables --help’ for more information.

Appreciate your quick response.


you have to describe a name of port args.
sudo iptables -A INPUT -p tcp --destination-port 8082 -s …

@player001 Nice catch, thank you. BTW I was able to complete the task.