You've already forked www.colben.cn
update
This commit is contained in:
32
content/post/ipv6.md
Normal file
32
content/post/ipv6.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: "Ipv6 笔记"
|
||||
date: 2019-10-29T21:07:06+08:00
|
||||
lastmod: 2019-10-29T21:07:06+08:00
|
||||
keywords: []
|
||||
tags: ["ipv6", "centos"]
|
||||
categories: ["network"]
|
||||
---
|
||||
|
||||
# CentOS7 禁用 ipv6
|
||||
## 方法1
|
||||
- 编辑 /etc/sysctl.conf,增加如下内容
|
||||
```
|
||||
net.ipv6.conf.all.disable_ipv6 =1
|
||||
net.ipv6.conf.default.disable_ipv6 =1
|
||||
```
|
||||
- 如果你想要为特定的网卡禁止IPv6,比如,对于enp0s3,添加下面的行
|
||||
```
|
||||
net.ipv6.conf.enp0s3.disable_ipv6 =1
|
||||
```
|
||||
- 生效
|
||||
```bash
|
||||
sysctl -p
|
||||
```
|
||||
|
||||
## 方法2
|
||||
- 执行下面命令
|
||||
```bash
|
||||
echo 1>/proc/sys/net/ipv6/conf/all/disable_ipv6
|
||||
echo 1>/proc/sys/net/ipv6/conf/default/disable_ipv6
|
||||
```
|
||||
|
Reference in New Issue
Block a user