In order for the multiplayer modes to work correctly, make sure the official Steam/XBO/PS4 ports are unlocked, please. You can find the ports at their official websites:

PS4: 
https://support.us.playstation.com/articles/en_US/KC_Article/Troubleshoot-Wired-or-Wireless-Network-Connection/?

XBO: 
http://support.xbox.com/en-US/xbox-one/networking/network-ports-used-xbox-live

Steam: 

https://support.steampowered.com/kb_article.php?ref=8571-GLVN-8711


See also:

Co-op / Multiplayer Instructions


[XBOX1] Can't join a friend's game / Game session no longer available