Centos下IPV6配置與開啟的方法

來源:互聯網
上載者:User

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 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.