Commit b4ad043b by Administrator

添加服务器 Iptables 信息

parent 756537bd
# 服务器初始化基础服务拟定方案 # 服务器初始化基础服务拟定方案
...@@ -127,7 +127,16 @@ Ansible Yaml 文件内容如下: ...@@ -127,7 +127,16 @@ Ansible Yaml 文件内容如下:
service: name=fail2ban state=started service: name=fail2ban state=started
``` ```
## 防火墙规则
内网以范围开启端口号
```
sudo firewall-cmd --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.0.0/24" port port="1024-65535" protocol="tcp" accept" --permanent
```
外网权限需指定特定的ip地址以及端口号,比如允许访问 Redis 服务端口号为 6379
```
sudo firewall-cmd --zone=public --add-rich-rule="rule family="ipv4" source address="115.231.214.234" port port="6379" protocol="tcp" accept" --permanent
```
## 服务器目录规划 * ## 服务器目录规划 *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment