How can I set up Firewall on my Virtual Machine?

Windows machine - Go to Control Panel -> System and Security -> Windows Firewall

Ubuntu machine - use ufw command, e.g. to allow incoming http connection
ufw allow 80
 
Other Linux Machine - modify the iptable rules by the iptable commands, e.g. to allow incoming http connection:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
 

Add Feedback