我正在嘗試配置綁定以在外部網路中廣播我的網域,但我的伺服器未偵聽外部 IP。
本地一切正常。
我的網頁介面:
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet INTERNAL_IP netmask 255.255.255.0 broadcast 192.168.55.255
inet6 INTERNAL_IP_V6 prefixlen 64 scopeid 0x20<link>
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
即使 iptables 關閉:
sudo iptables -L -n
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
命名.conf.選項:
options {
directory "/var/cache/bind";
statistics-file "/run/named/named.stats";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
forwarders {
x.x.x.x; # gateway or router
8.8.8.8;
8.8.4.4;
external ip;
};
dnssec-validation auto;
listen-on-v6 port 53 {any;};
listen-on port 53 {any;};
auth-nxdomain yes; # conform to RFC1035
allow-query { any; }; # allow anyone to issue queries
allow-recursion { any; };
allow-query-cache { any; };
recursion no; # disallow recursive queries
version "[SECURED]";
};
網路統計:
netstat -tulpn | grep :53
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 INTERNAL_IP:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN -
tcp6 0 0 :::53 :::* LISTEN -
udp 0 0 INTERNAL_IP:53 0.0.0.0:* -
udp 0 0 127.0.0.1:53 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp6 0 0 :::53 :::* -
udp6 0 0 :::5353 :::* -
烏夫沃:
sudo ufw status
Status: active
To Action From
-- ------ ----
DNS ALLOW Anywhere
DNS (v6) ALLOW Anywhere (v6)
nmap 顯示:
53/tcp filtered domain
我究竟做錯了什麼?
預先感謝您的幫助,Slawek。
答案1
我在 ubuntu 22 上使用 bind9 測試了您的配置。我認為您的連接埠轉送效果不佳。您應該為 tcp 和 udp 協定進行連接埠轉發
答案2
要關閉,它會暫時停止樂趣,沒有時間。感謝您的關注,我知道我還需要檢查什麼。問候。