[Linux]ubuntu開放server的指定埠
refs:
http://askubuntu.com/questions/293356/how-to-open-a-particular-port-in-ubuntu
Run this on the commandline; it should solve issue: sudo iptables -A INPUT -m conntrack –ctstate NEW,RELATED,ESTABLISHED -j ACCEPT
To do a specific port:
sudo iptables -A INPUT -p <tcp OR udp> <--dport OR --sport> <port> -j ACCEPT
INPUT is the chain for incoming traffic. -p is protocol (either tcp or udp –dport or –sportspecify allowing for destination or source port. -j is “jump” and its where you ACCEPT, REJECT, orDROP the packet(s)
所以,開放5600埠接收廣播,結果:
sudo iptables -A INPUT -p udp -d 0/0 -s 0/0 --dport 5600 -j ACCEPT
開放8000埠接收tcp,結果:
sudo iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 8000 -j ACCEPT
設定防火牆的規則,允許5600埠進入
sudo ufw allow 5600
sudo ufw allow 8000
檢視狀態:
sudo netstat -ntlup
nc 用法:
refs:
http://manpages.ubuntu.com/manpages/hardy/man1/nc_openbsd.1.html
CLIENT/SERVER MODEL
It is quite simple to build a very basic client/server model using nc.
On one console, start nc listening on a specific port for a connection.
For example:
$ nc -l 1234
nc is now listening on port 1234 for a connection. On a second console
(or a second machine), connect to the machine and port being listened on:
$ nc 127.0.0.1 1234
相關文章
- Ubuntu 18.04開放指定埠Ubuntu
- linux開放指定埠命令Linux
- Linux系統下如何在防火牆開放指定埠Linux防火牆
- linux 開放埠命令Linux
- CentOS開啟防火牆及開放指定埠CentOS防火牆
- Ubuntu檢視埠和釋放埠Ubuntu
- Ubuntu系統中防火牆的使用和開放埠Ubuntu防火牆
- linux 釋放埠Linux
- linux埠釋放Linux
- Linux 檢視對外開放埠Linux
- 在 Linux 系統中開放埠Linux
- 如何檢查 Linux 中的開放埠列表?Linux
- 在Linux中,如何檢視開放的埠?Linux
- 檢視Ubuntu上佔用指定埠的程序Ubuntu
- 埠開放
- Ubuntu檢視和釋放80埠Ubuntu
- 檢視Linux埠是否被開放@[環境部署]Linux
- CentOS7檢視開放埠命令及開放埠號CentOS
- Linux中檢查本地系統上的開放埠列表的方法Linux
- centos 開放埠配置命令CentOS
- websocket的埠,阿里雲伺服器安全組開放埠Web阿里伺服器
- nginx指定埠開啟gzip壓縮Nginx
- Linux檢視埠占用情況,並強制釋放佔用的埠Linux
- 終止指定埠的程式
- CentOS 7 開放防火牆埠CentOS防火牆
- Linux 防火牆只允許指定IP 埠訪問Linux防火牆
- win10開放埠怎樣檢視_win10檢視開放埠號的步驟Win10
- 如何檢查多個遠端 Linux 系統是否開啟了指定埠?Linux
- Centos7 firewall開放3306埠CentOS
- Teamcenter 虛擬機器埠開放虛擬機
- Firewall常用命令,開放埠
- 90-vm中centos 開放埠CentOS
- 修改防火牆規則,開放 Linux 的 3306 埠,外部訪問 MySQL 資料庫防火牆LinuxMySql資料庫
- 分享:有關Linux伺服器(在防火牆iptables)開放埠的操作總結Linux伺服器防火牆
- vCenter Server 所需要的埠Server
- 開啟、關閉防火牆或者開放埠防火牆
- 烏班圖Ubuntu 24.04 SSH Server 修改預設埠重啟無效UbuntuServer
- linux下mysql開啟遠端訪問許可權及防火牆開放3306埠LinuxMySql訪問許可權防火牆
- Ubuntu解除埠占用Ubuntu