Centosファイアウォールがdhcpv6応答メッセージをブロックしているようです。

Centosファイアウォールがdhcpv6応答メッセージをブロックしているようです。

奇妙なことに、私のCentOSはdhcpv6サーバーからdhcpv6応答メッセージを受け取ることができません。 dhcpv6-clientルールを有効にしました。

インターフェイスを開こうとするたびに dhcpv6 要求メッセージが送信されますが、dhcpv6 応答メッセージは受信されません。 Wiresharkを使用してインターフェイスをスニッフィングしようとしましたが、まだdhcpv6応答メッセージが受信されておらず、dhcpv6要求メッセージのみが見つかりました。

ファイアウォールが私のパケットをブロックしているようです。 Firewalldサービスを無効にすると、dhcpv6応答メッセージを受け取ることができます。しかし、ファイアウォールがdhcpv6要求メッセージをブロックしているのか、dhcpv6応答メッセージをブロックしているのかわかりません。

また、私のcentosは毎回ipv6ルーター広告パケットを処理しません。したがって、インターネットにアクセスするにはデフォルトのipv6ゲートウェイを設定する必要があります。これは、ファイアウォールがオンまたはオフのときに発生します。設定しようnet.ipv6.conf.enp7s0.accept_ra=2としましたが、net.ipv6.conf.enp7s0.forwarding=0すべて機能しません。

だから、あなたの助けが必要です。ありがとうございます!

-----編集1(追加iptables構成)------------------------- ---- -

私が知る限り、ファイアウォールはiptablesをバックエンドとして使用します。私の出力ip6tables --listは次のとおりです

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all      anywhere             anywhere             ctstate     RELATED,ESTABLISHED
ACCEPT     all      anywhere             anywhere            
INPUT_direct  all      anywhere             anywhere            
INPUT_ZONES_SOURCE  all      anywhere             anywhere            
INPUT_ZONES  all      anywhere             anywhere            
ACCEPT     ipv6-icmp    anywhere             anywhere            
REJECT     all      anywhere             anywhere             reject-with     icmp6-adm-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all      anywhere             anywhere             ctstate     RELATED,ESTABLISHED
ACCEPT     all      anywhere             anywhere            
FORWARD_direct  all      anywhere             anywhere            
FORWARD_IN_ZONES_SOURCE  all      anywhere             anywhere            
FORWARD_IN_ZONES  all      anywhere             anywhere            
FORWARD_OUT_ZONES_SOURCE  all      anywhere             anywhere            
FORWARD_OUT_ZONES  all      anywhere             anywhere            
ACCEPT     ipv6-icmp    anywhere             anywhere            
REJECT     all      anywhere             anywhere             reject-with         icmp6-adm-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
OUTPUT_direct  all      anywhere             anywhere            

Chain FORWARD_IN_ZONES (1 references)
target     prot opt source               destination         
FWDI_public  all      anywhere             anywhere            [goto] 
FWDI_public  all      anywhere             anywhere            [goto] 

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target     prot opt source               destination         

Chain FORWARD_OUT_ZONES (1 references)
target     prot opt source               destination         
FWDO_public  all      anywhere             anywhere            [goto] 
FWDO_public  all      anywhere             anywhere            [goto] 

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target     prot opt source               destination         

Chain FORWARD_direct (1 references)
target     prot opt source               destination         

Chain FWDI_public (2 references)
target     prot opt source               destination         
FWDI_public_log  all      anywhere             anywhere            
FWDI_public_deny  all      anywhere             anywhere            
FWDI_public_allow  all      anywhere             anywhere            

Chain FWDI_public_allow (1 references)
target     prot opt source               destination         

Chain FWDI_public_deny (1 references)
target     prot opt source               destination         

Chain FWDI_public_log (1 references)
target     prot opt source               destination         

Chain FWDO_public (2 references)
target     prot opt source               destination         
FWDO_public_log  all      anywhere             anywhere            
FWDO_public_deny  all      anywhere             anywhere            
FWDO_public_allow  all      anywhere             anywhere            

Chain FWDO_public_allow (1 references)
target     prot opt source               destination         

Chain FWDO_public_deny (1 references)
target     prot opt source               destination         

Chain FWDO_public_log (1 references)
target     prot opt source               destination         

Chain INPUT_ZONES (1 references)
target     prot opt source               destination         
IN_public  all      anywhere             anywhere            [goto] 
IN_public  all      anywhere             anywhere            [goto] 

Chain INPUT_ZONES_SOURCE (1 references)
target     prot opt source               destination         

Chain INPUT_direct (1 references)
target     prot opt source               destination         

Chain IN_public (2 references)
target     prot opt source               destination         
IN_public_log  all      anywhere             anywhere            
IN_public_deny  all      anywhere             anywhere            
IN_public_allow  all      anywhere             anywhere            

Chain IN_public_allow (1 references)
target     prot opt source               destination         
ACCEPT     udp      anywhere             fe80::/64            udp dpt:dhcpv6-client ctstate NEW
ACCEPT     tcp      anywhere             anywhere             tcp dpt:ssh ctstate NEW

Chain IN_public_deny (1 references)
target     prot opt source               destination         

Chain IN_public_log (1 references)
target     prot opt source               destination         

Chain OUTPUT_direct (1 references)
target     prot opt source               destination 

ベストアンサー1

問題1解決策:FirewalldはデフォルトでRPFを有効にし、dhcpv6応答メッセージはテーブルの元のチェーンPREROUTINGにインストールされているRPFルールによってブロックされます。

おすすめ記事