I'm trying to secure my computer against local network attacks for when I'm at university or a LAN party.
Does running a
nmap scan against my own IP go through the firewall or does it bypass the firewall?
The packets always pass the client firewall, but gets routed on your computer (these packets do not go outside the machine).
You can confirm it by using a packet sniffer like Wireshark or iptables. Using iptables:
if you run it from the same machine as your scanning, no - it doesn't leave your machine. It does hit your local firewall rules though. This applies for both localhost interfaces and your Network card IPs.