ubuntu如何开放端口?
复制代码 代码示例:
root@jbxue:$ sudo ufw enable
Firewall started and enabled on system startup
root@jbxue:$ sudo ufw allow 8080
Rules updated
root@jbxue:$ sudo ufw allow 8080/tcp
Rule added
root@jbxue:$ cat /etc/services | less
root@jbxue:$ sudo ufw allow webcache
Rules updated
root@jbxue:$ sudo ufw status
Firewall loaded
To Action From
-- ------ ----
8080:tcp ALLOW Anywhere
8080:udp ALLOW Anywhere
8080:tcp ALLOW Anywhere