IPv6站点配置流程(linux系统)

1,首先需要把IPV6地址绑定到服务器上

vi /etc/sysconfig/network-scripts/ifcfg-eth0   中增加IPV6配置

具体可参考https://www.dodolife.top/376

2,web服务器添加ipv6监听,特别是apache和nginx很多版本默认是没有ipv6监听的

Apache

listen 80默认即可

 

Nginx  添加参数listen [::]:80 ;

 

server {

listen 80;

listen [::]:80;

server_name

index index.php index.html index.htm;

root

}

3,ip6tables设置放行端口

vi /etc/sysconfig/ip6tables添加规则:

ip6tables -A INPUT -p tcp –dport 80 -j ACCEPT

service ip6tables restart

 

或直接关闭此服务

service ip6tables stop

如果配置了https的注意添加监听443端口:
listen [::]:443 ssl http2;

About sun 83 Articles
85后青年,自诩为伪文艺青年

Be the first to comment

Leave a Reply

Your email address will not be published.


*