Skip to content

Commit e900217

Browse files
committed
update linux: 增加防火墙相关命令
1 parent 1d9ca05 commit e900217

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

book/Linux/网络操作.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,22 @@ nmap [Scan Type(s)] [Options] {target specification}
334334
You have new mail in /var/spool/mail/root
335335
```
336336

337-
## 7. 上传/下载
337+
## 7. 防火墙
338+
339+
- 开放端口:
340+
341+
```shell
342+
firewall-cmd --zone=public --add-port=18227/tcp --permanent
343+
firewall-cmd --reload
344+
```
345+
346+
- 查询当前开放的端口:
347+
348+
```shell
349+
firewall-cmd --list-ports
350+
```
351+
352+
## 8. 上传/下载
338353

339354
### wget
340355

@@ -391,7 +406,7 @@ scp <option> srcPath tgtPath
391406
- `rz`命令(Receive Zmodem),将本地文件批量上传到远程Linux/Unix服务器,注意不能上传文件夹。
392407
- `sz`命令(Send Zmodem),将多个文件从远程服务器下载到本地,注意不能下载文件夹。
393408

394-
## 8. 文件传输协议
409+
## 9. 文件传输协议
395410

396411
文件传输是数据交换的主要形式。在进行文件传输时,为使文件能被正确识别和传送,我们需要在两台计算机之间建立统一的传输协议。这个协议包括了文件的识别、传送的起止时间、错误的判断与纠正等内容。
397412

0 commit comments

Comments
 (0)