
我有一个带有两个 IP 地址的 VPS。网卡分别是 Eth0 和 Eth0:1 如何设置规则,允许 Eth0:1 上的所有流量仅使用端口 5001-5999
问候 Anders Yuran
答案1
区块接口:
sudo ufw insert 1 deny in on {interface-here} from any to any
允许所需端口:
sudo ufw insert 1 allow in on {interface-here} from any to any port 5001:5999/tcp sudo ufw insert 1 allow in on {interface-here} from any to any port 5001:5999/udp