我试图允许从一个特定的IP地址的出站连接,并拒绝80端口上的所有其他IP地址的出站,但似乎无法破解它:
这些是命令:
ufw deny out 80 ufw allow out from xxx.xx.xx.xx
但是,它不允许出站连接到xx.xx.xx.xx的80端口:
80 DENY OUT Anywhere (out) Anywhere ALLOW OUT xxx.xx.xx.xx (out)
我究竟做错了什么 ?
以下将阻止端口80上的传出通信,但是阻止到IP xxx.xx.xx.xx
改变ufw中打开的默认传出
ufw deny out 80
允许传出到具体的ip:
ufw allow out to xxx.xx.xx.xx port 80