Most distributions of Linux include a firewall. It’s a pretty good idea that you read about how to implement and use one!
Linux Mint, being based on Ubuntu, uses the GUFW. GUFW stands for graphical, uncomplicated fire wall.
A fire wall, is a simple piece of software that watches your network connection as packets come and go from your computer to the internet.
To keep computers on the internet, or even your local network from getting into your computer, this is the way to do it. Open only the ports you need.
By default, the firewall is not active, so after you open the software, you’ll want to click the Unlock icon at the lower right corner, enter your password and then turn it on under Status. Next, it’s time to start building your rules. Generally speaking, you want to allow all outgoing packets, and only allow incoming packets that you really need. In the example above, the ports that I’ve opened are for incoming connections for file sharing using SAMBA.
Read all about setting up the various rules HERE