First up install a recent version of java then get a copy of UPnP Port Mapper. Once it has downloaded launch the jar file and you should see this window:
![Image](https://forums.factorio.com/images/ext/926b25d2eecf84b159a663627e3a44b3.png)
If you don't, go back an install Java and try again. Once you have this up press the connect button. You should see something like this.
![Image](https://forums.factorio.com/images/ext/64ee868c0459c760077912ce5e216ab2.png)
At this point if the software failed to find or connect to your router there is not much you can do except come back here and bag me out. If you do manage to connect you can now add ports to your router. To add Factorio click Create. This will open up a new window. Click Add 2 times and set the info like so (note, 34197 is the default factorio port, if you have changed it you need to change the numbers here):
![Image](https://forums.factorio.com/images/ext/ccef91ccf3927ea0c74e440a6c840db2.png)
Click save, select the the factorio port mapping and click Use. This should add the mappings to the list above like so
![Image](https://forums.factorio.com/images/ext/0d177c7ee32c1a93c397f6aa88490724.png)
If you made it this far you should have ports open on your router. You may need to do this again if your router or computer restarts. Hope this helps.