Skip to content

Commit

Permalink
Add jurySec.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichunqi committed Jul 31, 2019
1 parent 8b6c09c commit 039a797
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions jurySec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

#添加docker启动配置daemon.json文件
cat > /etc/docker/daemon.json <<EOF
{
"icc":false,
"ip-forward":false
}
EOF

#重新加载配置文件
systemctl daemon-reload

#重启docker服务
systemctl restart docker.service

#禁止宿主机IP转发功能
cat >> /etc/sysctl.conf <<EOF
net.ipv4.ip_forward=0
EOF

#重新加载配置文件
sysctl -p /etc/sysctl.conf

0 comments on commit 039a797

Please sign in to comment.