> For the complete documentation index, see [llms.txt](https://cf337188.gitbook.io/01/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cf337188.gitbook.io/01/20190529.md).

# 20190529

iptables重點:

![](/files/-Lg1IUzaO0u8tGVo7iOF)

![](/files/-Lg1IsbfDkimBO5P0UHt)

![](/files/-Lg1J4K_Dwmj2hDoiqq2)

![](/files/-Lg1JWq_2G52TtQgGPkD)

![](/files/-Lg1QxV_0LTPsfCtUYUh)

\[server]

```
# iptables -F
# iptables -L
# iptalbes -I INPUT -p tcp --dport 80 -j ACCEPT
# iptalbes -I INPUT -p tcp --dport 22 -j ACCEPT
# iptalbes -I INPUT -p tcp --dport 10:21 -j ACCEPT
# iptables -L
# iptalbes -I INPUT -p icmp -j ACCEPT
# iptables -A INPUT -j REJECT
```

![](/files/-Lg1NTibiVIz2Jt_9n6c)

![](/files/-Lg1NeOXZAa5QHkUnW3P)

![](/files/-Lg1O9byEw4PiU2wUIsO)

![](/files/-Lg1OKz31-Cus6JPCkCm)

\[client]

```
# yum install nmap
# nmap -sS -p 0-1000 192.168.56.101
```

![](/files/-Lg1OnC9_mYpcxG_BTjF)

\[server]

```
# iptables -D INPUT -p tcp --dport 80 -j ACCEPT
# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
```

![](/files/-Lg1P8Bdz5-xgpj6p5H2)

![](/files/-Lg1PQUnFuSM8hOLeJ2y)

\[client]

```
# nmap -sS -p 0-1000 192.168.56.101
```

![](/files/-Lg1PfxXQ1XTZ032UlRC)

![](/files/-Lg1PsfYxr9Pn48SFmuu)
