I am trying to allow outbound connections from a specific IP address and deny outbound from all other ip addreses on port 80, but can't seem to crack it:
These are the commands:
ufw deny out 80
ufw allow out from xxx.xx.xx.xx
However it is not allowing outbound connections to port 80 from xx.xx.xx.xx:
80 DENY OUT Anywhere (out)
Anywhere ALLOW OUT xxx.xx.xx.xx (out)
What am I doing wrong ?
Best Answer
The following would prevent outgoing traffic on port 80 but to the ip xxx.xx.xx.xx
change the default outgoing open in ufw
allow outgoing to the specific ip: