linux 防火墙打开5432 端口,在ubuntu上打开端口5432

我试图使用ufw使用sudo ufw allow 5432 / tcp在ubuntu上打开端口5432

然后我使用nmap来查看端口5432是否已打开,我得到了这个:

root@domain:~# sudo nmap -sS -O 127.0.0.1

Starting Nmap 5.21 ( http://nmap.org ) at 2011-12-01 14:28 MSK

Nmap scan report for localhost.localdomain (127.0.0.1)

Host is up (0.000084s latency).

Not shown: 994 closed ports

PORT STATE SERVICE

22/tcp open ssh

25/tcp open smtp

80/tcp open http

587/tcp open submission

5432/tcp open postgresql

10000/tcp open snet-sensor-mgmt

Device type: general purpose

Running: Linux 2.6.X

OS details: Linux 2.6.15 - 2.6.30

Network Distance: 0 hops

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .

Nmap done: 1 IP address (1 host up) scanned in 2.28 seconds

root@domain:~# sudo nmap -sS -O 1xx.xxx.xxx.xxx

Starting Nmap 5.21 ( http://nmap.org ) at 2011-12-01 14:30 MSK

Nmap scan report for domain.info (1xx.xxx.xxx.xxx)

Host is up (0.000086s latency).

Not shown: 997 closed ports

PORT STATE SERVICE

22/tcp open ssh

80/tcp open http

10000/tcp open snet-sensor-mgmt

Device type: general purpose

Running: Linux 2.6.X

OS details: Linux 2.6.15 - 2.6.30

Network Distance: 0 hops

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .

Nmap done: 1 IP address (1 host up) scanned in 2.65 seconds

1xx.xxx.xxx.xxx是我服务器的IP.

我编辑了pg_hba.conf:

# DO NOT DISABLE!

# If you change this first entry you will need to make sure that the

# database

# super user can access the database using some other method.

# Noninteractive

# access to all databases is required during automatic maintenance

# (custom daily cronjobs, replication, and similar tasks).

#

# Database administrative login by UNIX sockets

local all postgres ident

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only

local all all ident

# IPv4 local connections:

host all all 0.0.0.0/0 md5

# IPv6 local connections:

host all all ::1/128 md5

但是5432端口尚未打开.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值