IPv6防火启用
service ip6tables start
设定开机启动
chkconfig --level 2345 ip6tables on
查询一下default gateway位址:
ip -6 route
2001:288:82b2:1:209:fff:fe85:f71e
网路相关设定
vi /etc/hosts
2001:288:82b2:1::77 w2.ipv6.shsps.kh.edu.tw w2.ipv6
vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=yes
IPV6ADDR=2001:288:82b2:1::77/64
vi /etc/hosts.allow
ALL:[::1]/128
ALL:163.32.244.0/255.255.255.0:allow
ALL:192.168.5.0/255.255.255.0:allow
ALL:192.168.1.0/255.255.255.0:allow
ALL:192.168.2.0/255.255.255.0:allow
sshd:ALL:allow
vsftpd:ALL:allow
sendmail:ALL:allow
httpd:ALL:allow
vi /etc/resolv.conf
; generated by /sbin/dhclient-script
search shsps.kh.edu.tw
nameserver 163.32.244.1
nameserver 163.28.136.2
nameserver 163.28.136.10
nameserver 163.28.136.14
nameserver 140.117.11.1
nameserver 168.95.1.1
vi /etc/sysconfig/network
NETWORKING_IPV6=yes
IPV6_AUTOCONF=no
IPV6_DEFAULTGW=2001:288:82b2:1:209:fff:fe85:f71e%eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=yes
IPV6ADDR=2001:288:82b2:1::77/64
测试一下,IPv6上Internet有没有通:www.111cn.net
ping6 www.ipv6.hinet.net
web设定IPV6
检查法,查看http service是否同时支援IPv4/IPv6
netstat -an | grep :80
主机(网站)有装phpmyadmin套件来管理MySQL资料库
vi /etc/httpd/conf.d/phpmyadmin.conf
<Directory “/usr/share/phpmyadmin”>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 163.32.119.128/25
Allow from ::1/128
Allow from 2001:288:82b2:3::/64
Allow from 2001:288:82b2:2::/64
</Directory>
修正完成后,记得要重新启动http serive,以便套用新的设定参数:
# service httpd restart