Run Command Prompt as an Administrator, and paste the following commands:
netsh advfirewall firewall add rule name="FXServer (30120/TCP)" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FXServer (30120/UDP)" dir=in action=allow protocol=UDP localport=30120
netsh advfirewall firewall add rule name="txAdmin (40120/TCP)" dir=in action=allow protocol=TCP localport=40120
This will then open the ports needed for a FiveM server.