这是iptables规则:
-A INPUT -i eth0 -s 10.2.0.51,10.2.0.52 -d 228.0.0.3 -j ACCEPT我怎样才能把它翻译成ufw规则?
我试过:
root@localhost:~# sudo ufw allow from 10.2.0.51,10.2.0.,52 to 228.0.0.3 to any port
ERROR: Wrong number of arguments
root@localhost:~# sudo ufw allow from 10.2.0.51,10.2.0,52 to 228.0.0.3 to any port proto tcp
ERROR: Wrong number of arguments我遗漏了什么?
发布于 2016-10-21 10:46:47
语法如下:
sudo ufw allow from <target> to <destination> port <port number> proto <protocol name>所以,你应该跑
sudo ufw allow from 10.2.0.51,10.2.0.52 to 228.0.0.3它将允许所有端口和所有协议。仅适用于TCP:
sudo ufw allow from 10.2.0.51,10.2.0.52 to 228.0.0.3 proto tcphttps://serverfault.com/questions/810362
复制相似问题