Basic

FreeNAS
       
IPV6相關檔案及目錄

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有沒有通:

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

Don彙整筆記2010啟用