The pfSense Store

Author Topic: UPnP multiple hosts playing the same game using the same port  (Read 512 times)

0 Members and 1 Guest are viewing this topic.

Offline phobix

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Hey all,
I am trying to figure out the best way to get multiple hosts to be able to play a game (For Honor) with open NAT. I can get the first one to work with the common sense UPnP settings enabled as well as static outbound. However, I feel like there has to be a cleaner way to be doing this as all consumer grade routers I have used are capable of handling multiple PCs playing the same game (using the same default port) on the same network at the same time.
This is really the last sticking point before I fully adopt pfsense as my new router. Without this key ability, I cannot justify moving away from consumer routers that "just work".
I am open to redoing my entire config to figure out the "right" way to get this done. Can anyone please help?
Thanks!


Offline trinaryatom

  • Newbie
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
Re: UPnP multiple hosts playing the same game using the same port
« Reply #2 on: August 08, 2017, 04:42:22 pm »
I have created a post about this as well.
https://forum.pfsense.org/index.php?topic=111328.msg619952#msg619952

I have followed the article you mentioned for the past year across different versions and it still produces the same problem.
Please keep in mind that UPnP problem depends heavily on what is trying to use it. It seems that specific games / services use it differently. So, what may work for you, may not work for others. It seems that all home routers handle this just fine. Which leads me to believe that the problem is somehow part of UPnP not communicating the way that it should to specific games. (Keep in mind, I am pointing my finder at UPnP because that is what looks like to be the weak link in the chain. I often wonder if there is another setting that these odd games depend on that inst obvious in the article above.)

Offline orangepeelbeef

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: UPnP multiple hosts playing the same game using the same port
« Reply #3 on: August 30, 2017, 01:05:35 pm »
As others have mentioned, if the game is not coded properly to use Upnp you are not going to have much luck (ie if it only requests 1 port, and that port is the same on all your different consoles you cannot do so)  The only fix for that type of issue is to have a public IP address for every game console you own.  Most ISP's charge extra for additional IP addresses.   

Also, as the other thread is locked, and I could not find the upnp restart script mentioned in that thread, I figured out a way to restart upnp for me every morning.


Here's the php script
Code: [Select]
<?php
require_once('/etc/inc/services.inc');
require_once(
'/etc/inc/service-utils.inc');
upnp_action('restart');
?>



Then install the cron package, and set it to execute.  Here's what mine looks like.

/usr/bin/nice -n20 /usr/local/bin/php /root/restart_upnp.php

obviously i placed the above script code into /root/restart_upnp.php


As far as 'all home routers do this fine'  I would highly disagree with that.   If you have good luck with default settings on home routers then your upnp should be fine in pfsense.


My only issue was that after a day or two (using 2 PS4's and playing bloodborne, dark souls, etc co-op) it will eventually run out of mappings as they do not age out.   Hence the script to restart upnp every morning. 

Another thing to mention is that the ps4's/xbox's don't remember their upnp settings between boots.  If your games don't work, i would suggest closing the games on all consoles,   restarting upnp on the pfsense, and then launching all the apps again.  This has fixed our issues 99.9% of the time.   

« Last Edit: August 30, 2017, 01:12:18 pm by orangepeelbeef »