iptables
hkNaruto
这个作者很懒,什么都没留下…
展开
-
CentOS iptables nat ip_forward 开启路由转发功能
路由功能服务器(192.168.0.3、有公网)修改/etc/sysctl.conf,修改或新增net.ipv4.ip_forward=1执行(开启ip转发、开启nat路由)# 加载ip_forwardsysctl -p# 默认允许FORWARDiptables -P FORWARD ACCEPT# 开启所有地址路由转发iptables -t nat -A POSTROUTING -j MASQUERADE客户端(192.168.0.4、无公网),运行以下指令制定路由原创 2022-01-12 09:13:42 · 4154 阅读 · 1 评论 -
宿主服务器通过iptables FORWARD链限制docker容器禁止对外部指定ip地址的访问
iptables -I FORWARD -s 192.168.1.0/24 -j REJECTiptables -I FORWARD -d 192.168.1.0/24 -j REJECT原创 2021-12-23 11:23:58 · 2707 阅读 · 1 评论 -
Fedora 31 k8s kubernetes kubeasz 防火墙 firewalld 导致 harbor pod 容器 实例 网络不通 connect: connection refused
防火墙开启状态,harbor pod出错Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning Unhealthy 19m (x319 over 7h28m) kubelet, 10.51.72.167原创 2020-12-29 09:37:06 · 1641 阅读 · 0 评论 -
CentOS firewalld笔记
默认配置下,iptables filter规则Chain INPUT (policy ACCEPT)target prot opt source destination ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHEDACCEPT all -- 0.0.0.0/0 0.0.0.0/0原创 2020-10-28 10:58:10 · 596 阅读 · 0 评论 -
iptables笔记
指定默认规则iptables -P[root@localhost ~]# iptables -P INPUT ACCEPT[root@localhost ~]# iptables -L -nChain INPUT (policy ACCEPT)target prot opt source destination Chain FORWARD (policy ACCEPT)target prot opt source原创 2020-10-28 10:34:07 · 170 阅读 · 0 评论