[GH-ISSUE #358] 端口连接问题 #331

Closed
opened 2026-03-02 08:01:25 +03:00 by kerem · 3 comments
Owner

Originally created by @ufocjm on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/358

@ufocjm 你好!根据你的描述,原先的问题已解决。但没有理解你所说的 "除了22端口,也就是ssh端口以外,都连不上这台机子了,要重启电脑才可以"。你可以开一个新的 Issue 并详细说一下。该问题可能与你的 Docker 主机 IPTables 防火墙配置有关。

Originally posted by @hwdsl2 in https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/356#issuecomment-1474742790

Originally created by @ufocjm on GitHub (Mar 20, 2023). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/358 @ufocjm 你好!根据你的描述,原先的问题已解决。但没有理解你所说的 "除了22端口,也就是ssh端口以外,都连不上这台机子了,要重启电脑才可以"。你可以开一个新的 Issue 并详细说一下。该问题可能与你的 Docker 主机 IPTables 防火墙配置有关。 _Originally posted by @hwdsl2 in https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/356#issuecomment-1474742790_
kerem closed this issue 2026-03-02 08:01:25 +03:00
Author
Owner

@ufocjm commented on GitHub (Mar 20, 2023):

很有可能,因为安装k8s的前提是要在机子上运行如下命令

# 临时关闭
swapoff -a

# 永久关闭
sed -ri 's/.*swap.*/#&/' /etc/fstab

systemctl stop firewalld.service
systemctl disable firewalld.service

# 临时关闭
setenforce 0 
# 永久禁用
sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config

cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter
EOF

cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
# 手动加载所有的配置文件
sysctl --system

不确定会不会是这些问题导致的

<!-- gh-comment-id:1475520985 --> @ufocjm commented on GitHub (Mar 20, 2023): 很有可能,因为安装k8s的前提是要在机子上运行如下命令 ```bash # 临时关闭 swapoff -a # 永久关闭 sed -ri 's/.*swap.*/#&/' /etc/fstab systemctl stop firewalld.service systemctl disable firewalld.service # 临时关闭 setenforce 0 # 永久禁用 sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf br_netfilter EOF cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF # 手动加载所有的配置文件 sysctl --system ``` 不确定会不会是这些问题导致的
Author
Owner

@hwdsl2 commented on GitHub (Mar 24, 2023):

@ufocjm 根据你的描述,是有可能与 k8s 的配置有关。具体我不太清楚,你再自己查找一下原因。

<!-- gh-comment-id:1482277579 --> @hwdsl2 commented on GitHub (Mar 24, 2023): @ufocjm 根据你的描述,是有可能与 k8s 的配置有关。具体我不太清楚,你再自己查找一下原因。
Author
Owner

@ufocjm commented on GitHub (Mar 24, 2023):

@hwdsl2 好的,谢谢

<!-- gh-comment-id:1482532816 --> @ufocjm commented on GitHub (Mar 24, 2023): @hwdsl2 好的,谢谢
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-ipsec-vpn-server#331
No description provided.