redis关闭防火墙
时间: 2023-08-25 13:16:13 浏览: 86
要关闭防火墙以允许远程访问Redis,您需要执行以下步骤:
1. 使用命令`firewall-cmd --zone=public --list-ports`检查当前防火墙是否已经开放Redis的端口。中的配置文件修改了Redis的bind和protected-mode参数,以允许远程访问。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* *3* [RESP.app 连接redis失败时防火墙设置](https://blog.csdn.net/m0_51277527/article/details/127717121)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
相关问题
redis关闭防火墙指令
如果你的防火墙是iptables,可以使用以下命令关闭redis端口:
```
sudo iptables -I INPUT -p tcp --dport 6379 -j ACCEPT
```
这将在iptables规则中添加一条允许端口6379的规则,从而关闭防火墙。如果你想永久关闭防火墙,请将`-I`选项替换为`-A`选项以将规则添加到iptables永久规则中。
linux系统中redis关闭防火墙指令
Linux系统中关闭防火墙指令可以根据具体的防火墙软件和版本而有所不同。以下示例是针对CentOS 7下的firewalld防火墙:
1. 停止firewalld服务:
```
systemctl stop firewalld
```
2. 禁止firewalld服务开机自启:
```
systemctl disable firewalld
```
如果你使用的是其他防火墙软件,可以通过查询相应的文档或手册来获得关闭防火墙的指令。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)