网卡配置 auto vmbr1 iface vmbr1 inet static address 192.168.1.1/24 bridge-ports none bridge-stp off bridge-fd 0 post-up echo 1 > /proc/sys/net/ipv4/ip_forward post-up bash /root/iptables.config.sh post-up iptables -t nat -A POSTROUTING -s ‘192.168.1.0/24’ -o vmbr0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s ‘192.168.1.0/24’ -o vmbr0 -j MASQUERADE post-up iptables -t nat -A PREROUTING -i eno1 -p tcp –dport 2222 -j DNAT –to 192.168.1.67:22 post-down iptables -t nat -D PREROUTING -i eno1 -p tcp –dport 2222 -j DNAT –to 192.168.1.67:22复制代码
在服务器上连192.168.1.67的ssh可以连,但是到我电脑上通过转发连不上,