search

Home  >  Q&A  >  body text

How to open a specified port in iptables in Linux

I am using CentOS6.8 Xiaoniao Cloud Server. Because the ssh remote connection port has been modified, port number 22 has been changed to port number 33. I would like to know how to release the new port on iptables.

想无想无1157 days ago1273

reply all(1)I'll reply

  • yntdx

    yntdx2021-12-24 18:27:14

    Check the status: iptables -L -n Add the method of opening specific ports below: use iptables to open the following ports /sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT to save /etc/rc.d/ init.d/iptables save restart service service iptables restart to check whether the port that needs to be opened takes effect? /etc/init.d/iptables status For more information, please refer to: https://www.niaoyun.com/docs/15895.html/?utm_source=phpl-1227

    reply
    0
  • Cancelreply