Your firewall needs to let traffic on those ports from any address through to your PC (and from these ports on your PC to any address).
Firewalls are an important part of a network’s security; their job is to prevent unauthorized network traffic from passing through (ie: malicious hackers or viruses trying to connect to your PC). A conservative firewall can be configured to block most traffic and require administrators to grant exceptions to specific programs to allow their traffic through.