linux 开启新端口号,linux 查看端口,开启新端口
生活随笔
收集整理的這篇文章主要介紹了
linux 开启新端口号,linux 查看端口,开启新端口
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
舉例:
開放10000端口的解決步驟如下:
1、修改/etc/sysconfig/iptables文件,增加如下一行:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT
重啟 iptables
service iptables restart
2、重啟防火墻,這里有兩種方式重啟防火墻 a) 重啟后生效
開啟: chkconfig iptables on
關閉: chkconfig iptables off b) 即時生效,重啟后失效
開啟: service iptables start
關閉: service iptables stop
3、或者用menu-system-administration-firewall
去添加用戶需要的端口。
By the way:
a. ?netstat -tanp 去顯示端口狀態。
/usr/sbin/lsof -i
b. telnet ipaddr port
to check if ip and port is available before making connection.
總結
以上是生活随笔為你收集整理的linux 开启新端口号,linux 查看端口,开启新端口的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux系统程序PPT,Linux 系
- 下一篇: Linux利用子命令m,Linux md