is performing an nmap on your default gateway ip illegal or it is legal because it is your router's ip address?
I wanted to exploit the vulnerabilities but wanted to check first what I was doing was legal or not.
I am not a lawyer nor is this legal advice
You can nmap scan your own local router IP address with nmap as it is your residential network. That is explicitly mentioned here in the nmap book.