You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shell-project/os/lvs/lvs-nat-real.sh

17 lines
267 B

#!/usr/bin/bash
# 默认网关
GATEWAY=192.168.96.166
# 网卡
INTERFACE=ens33
case $1 in
start)
ip route add default via $GATEWAY dev $INTERFACE
;;
stop)
ip route del default via $GATEWAY dev $INTERFACE
;;
*)
echo "Usage: $0 {start|stop}"
esac