小编Vic*_*tor的帖子

远程连接Postgres,在iptables中为Postgres打开5432端口

我正在尝试远程连接到 Postgres,但我需要在 iptables 中打开端口 5432。我目前的iptables配置如下:

*filter


#  Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT


#  Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT


#  Allows all outbound traffic
#  You can modify this to only allow certain traffic
-A OUTPUT -j ACCEPT


# Allows HTTP and HTTPS connections from anywhere (the normal …
Run Code Online (Sandbox Code Playgroud)

postgresql iptables

4
推荐指数
1
解决办法
3万
查看次数

标签 统计

iptables ×1

postgresql ×1