V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
D5dRvCVRmuC4qz6Z
V2EX  ›  OpenWrt

求助: ipv4 无法访问, ipv6 却可以正常使用

  •  
  •   D5dRvCVRmuC4qz6Z · 2022-08-14 00:15:55 +08:00 · 1071 次点击
    这是一个创建于 832 天前的主题,其中的信息可能已经有所发展或是发生改变。

    遇到一个十分诡异的问题,openwrt 路由正常访问 ipv4 和 ipv6 ,但是连接的设备 ipv4 ping 不通,ipv6 却可以正常使用。

    防火墙的配置如下

    config defaults
    	option input 'ACCEPT'
    	option output 'ACCEPT'
    	option flow_offloading '1'
    	option flow_offloading_hw '1'
    	option fullcone '1'
    	option synflood_protect '1'
    	option forward 'ACCEPT'
    
    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'
    	option input 'REJECT'
    	option output 'ACCEPT'
    	option forward 'REJECT'
    	option masq '1'
    	option mtu_fix '1'
    
    config forwarding
    	option src 'lan'
    	option dest 'wan'
    
    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'
    
    config rule
    	option name 'Support-UDP-Traceroute'
    	option src 'wan'
    	option dest_port '33434:33689'
    	option proto 'udp'
    	option family 'ipv4'
    	option target 'REJECT'
    	option enabled 'false'
    
    config include
    	option path '/etc/firewall.user'
    
    config include 'miniupnpd'
    	option type 'script'
    	option path '/usr/share/miniupnpd/firewall.include'
    	option family 'any'
    	option reload '1'
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   953 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 20:23 · PVG 04:23 · LAX 12:23 · JFK 15:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.