3台服务器:node1(vs),node2(rs),node3(rs)
lvs-nat
一、环境
1.时间同步
node1
tzselect 5 9 1 1
TZ='Asia/Shanghai'; export TZ
allow 192.168.146.0/24
node2/3
vim /etc/chrony.conf
server 192.168.146.100 iburst
ntpdate 192.168.146.100
2.vs2个物理网卡
vs eth1 172.16.60.183/24
vs eth2 192.168.146.100
nmcli connection modify eth1 ipv4.gateway 192.168.146.100
nmcli connection eth 1 up
rs1 192.168.146.101/24
gw 192.168.146.100 网卡host-only
rs2 192.168.146.102/24
gw 192.168.146.100 网卡host-only
3.iptables -nL
iptables -F
systemctl stop firewalld
systemctl disable firewalld
4.vs打开ipforward
echo net.ipv4.ip_forward> /etc/sysctl.conf
sysctl -p
二.rs的服务
开启h