How to add port to iptable in linux

Please note that this document is for reference only we do not take any responsible for any data lost.




let say you want to add port 456 to iptable

login to your server via ssh and type in following command

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 456 -j ACCEPT

this will allow port 456 to pass thru to firewall
  • Iptable, linux, ping, firewall
  • 12 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

How to Reset Mysql passowrd

  Step # 1 : Stop mysql service # /etc/init.d/mysql stop Output: Stopping MySQL database...

How to Change SSH Port in Centos

Login into your Server Via Putty or any SSH client.type in following...

Reset forgotten root password on CentOS

1. Boot the system and when you see the following message "Press any key to enter the...

Linux Firewall Fail2Ban

How To Protect SSH with fail2ban on CentOS 6  Step One—Install Fail2Ban Because...

Adding and viewing IP addresses on CentOS servers

To add newly assigned IP addresses from SSH, follow this procedure: (Please follow the steps...