ファイアウォール未登録コマンド

ファイアウォール未登録コマンド

開こうとしているファイルを firewalld開くためのいくつかのコマンドを送信しました。開いているとマークされますが、そのIPは存在しません。PostgreSQL port 5432nmaplocalhost4192.168.1.23

sniffing ports 0-10000 on 192.168.1.23...
Starting Nmap 7.91 ( https://nmap.org ) at 2022-07-18 12:12 EDT
Nmap scan report for neb.local (192.168.1.23)
Host is up (0.0000060s latency).
Not shown: 10000 closed ports
PORT   STATE SERVICE
22/tcp open  ssh

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

sniffing ports 0-10000 on localhost4...
Starting Nmap 7.91 ( https://nmap.org ) at 2022-07-18 12:12 EDT
Nmap scan report for localhost4 (127.0.0.1)
Host is up (0.0000060s latency).
rDNS record for 127.0.0.1: localhost
Not shown: 9999 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
5432/tcp open  postgresql

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

そのIPでこのポートを見ることができず、192.168.1.24別のボックス()で開いているようです。

Starting Nmap 7.70 ( https://nmap.org ) at 2022-07-18 12:37 EDT
Nmap scan report for neb.local (192.168.1.23)
Host is up (0.00034s latency).

PORT     STATE  SERVICE
5432/tcp closed postgresql
MAC Address: D0:50:99:87:7B:4A (ASRock Incorporation)

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

どのように動作させることができますか?firewalld手順は次のとおりです。

sudo firewall-cmd --zone=public --permanent --add-service=postgresql
sudo firewall-cmd --zone=public --permanent --add-port 5432/tcp
sudo firewall-cmd --permanent --add-source=192.168.1.24
sudo firewall-cmd --permanent --add-user1-rule='rule family="ipv4" source address="192.168.1.24" port protocol="tcp" port="5432" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s25
  sources: 192.168.1.24
  services: cockpit dhcpv6-client postgresql ssh
  ports: 5432/tcp
  protocols:
  forward: yes
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
    rule family="ipv4" source address="192.168.1.24" port port="5432" protocol="tcp" accept

ベストアンサー1

おすすめ記事