_______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- OpenWrt 22.03.0, r19685-512e76967f ----------------------------------------------------- root@OpenWrt:~# root@OpenWrt:~#
测试访问IPv6是否正常
1 2 3 4 5 6 7 8 9 10 11
# 测试访问IPv6是否正常 root@OpenWrt:~# ping www.oiox.cn -6 PING www.oiox.cn (2409:8c44:2:160:50::): 56 data bytes 64 bytes from 2409:8c44:2:160:50::: seq=0 ttl=56 time=23.455 ms 64 bytes from 2409:8c44:2:160:50::: seq=1 ttl=56 time=22.949 ms 64 bytes from 2409:8c44:2:160:50::: seq=2 ttl=56 time=23.338 ms 64 bytes from 2409:8c44:2:160:50::: seq=3 ttl=56 time=23.695 ms ^C --- www.oiox.cn ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 22.949/23.359/23.695 ms
config zone option name 'lan' list network 'lan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT'
config zone option name 'wan' list network 'wan' list network 'wan6' list network 'nat64' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' option masq '1' option mtu_fix '1'
config forwarding option src 'lan' option dest 'wan'
config rule option target 'ACCEPT' option name 'IPv' option src '*' option dest '*'
config rule option name 'Allow-DHCP-Renew' option src 'wan' option proto 'udp' option dest_port '68' option target 'ACCEPT' option family 'ipv4'
config rule option name 'Allow-Ping' option src 'wan' option proto 'icmp' option icmp_type 'echo-request' option family 'ipv4' option target 'ACCEPT'
config rule option name 'Allow-IGMP' option src 'wan' option proto 'igmp' option family 'ipv4' option target 'ACCEPT'
config rule option name 'Allow-DHCPv6' option src 'wan' option proto 'udp' option dest_port '546' option family 'ipv6' option target 'ACCEPT'
config rule option name 'Allow-MLD' option src 'wan' option proto 'icmp' option src_ip 'fe80::/10' list icmp_type '130/0' list icmp_type '131/0' list icmp_type '132/0' list icmp_type '143/0' option family 'ipv6' option target 'ACCEPT'
config rule option name 'Allow-ICMPv6-Input' option src 'wan' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' list icmp_type 'router-solicitation' list icmp_type 'neighbour-solicitation' list icmp_type 'router-advertisement' list icmp_type 'neighbour-advertisement' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT'
config rule option name 'Allow-ICMPv6-Forward' option src 'wan' option dest '*' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT'
config rule option name 'Allow-IPSec-ESP' option src 'wan' option dest 'lan' option proto 'esp' option target 'ACCEPT'
config rule option name 'Allow-ISAKMP' option src 'wan' option dest 'lan' option dest_port '500' option proto 'udp' option target 'ACCEPT'
root@OpenWrt:~# vim /etc/bind/named.conf root@OpenWrt:~# cat /etc/bind/named.conf // This is the primary configuration file for the BIND DNS server named.
options { directory "/tmp";
// If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; allow-query { any; }; allow-query-cache { any; }; recursion yes; allow-recursion { any; }; forwarders { // 0.0.0.0; 202.106.46.151; 202.106.0.20; //114.114.114.114; //8.8.8.8; }; dns64 ddbe:48ec:56c6:1111::/96 { clients { any; }; mapped { any; }; exclude { ddbe:48ec:56c6:1111::/96; ::ffff:0000:0000/96; }; suffix ::; }; dnssec-validation no; auth-nxdomain no; # conform to RFC1035
};
include "/etc/bind/named-rndc.conf";
include "/tmp/bind/named.conf.local";
// prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; };
// be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912
zone "localhost" { type master; file "/etc/bind/db.local"; };
zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; };
zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; };
zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; root@OpenWrt:~#
1 2 3 4 5 6 7 8
# 重新DNS服务 # 关闭默认dnsmasq # 启用新安装named
root@OpenWrt:~# service dnsmasq stop root@OpenWrt:~# service named start root@OpenWrt:~#