This commit is contained in:
2021-11-14 14:32:08 +08:00
parent f75ad8bedd
commit b0f6120151
152 changed files with 22219 additions and 8 deletions

32
content/post/ipv6.md Normal file
View 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
```