I needed to write a iptables rule to block outbound traffic to a specific host here.
Now I need to write a similar rule which will not block the entire host but just a single port to a host.
The rule is very simlar to the previously state but with the port flag, see below.
1 |
iptables -A OUTPUT -p tcp --dport 8080 -d 10.1.2.6 -j DROP |