Windows Firewall & Gateway Configuration

Ports: are simply virtual pipelines that allow computers and devices to communicate and send information back and forth on the Internet.

Port forwarding: – or creating a port forward – is a common process in gaming that makes your gaming console or PC more accessible to other gaming consoles or PCs on the Internet. Port forwarding can improve connection speed, lobby wait times, and overall gameplay, particularly for a host.

NAT: (Network Address Translation) is a networking concept that allows your router to share a single IP (Internet Protocol) address across multiple devices on your network. Instead of your ISP (Internet Service Provider) assigning an IP address to every device that connects to the Internet, NAT allows your ISP to assign a single IP address to your router. The router then manages a set of IP addresses for all devices on your home network.

WINDOWS FIREWALL CONFIGURATION

WINDOWS 10 & WIN SERVER 2012 R2 - WIN SERVER 2019

  1. It is STRONGLY RECOMMENDED to set a static IP to your host machine/server. Learn more: https://stevessmarthomeguide.com/setting...indows-10/
  2. Check your current network type, this will be important for later. I'd strongly advise setting your type to PUBLIC.

    [Image: RUcT3ac.png]
  3. Search "Windows Defender Firewall with Advanced Security" and go to Inbound Rules.
  4. Go to Actions > New Rule...
  5. In the next few menus you'll do the following. Port > Specific local ports > UDP 27017 > Allow the connection > Uncheck all but Public > Name accordingly to your new rule. 
    Note: You can specify a port range of your choosing if you plan on running multiple servers on one host machine. For example, 27017-27025.
    Make sure your ports do not conflict with known internet ports. Find more here
    Note: Ensure that the rule is set for the correct network type your adapter is running. For example, if Public, then set Public in the settings.
    Note: Windows Firewall is a leap, I know, if you are having issues I'd try enabling all network types in your rule i.e Public, Private, Domain. 
  6. Done.

GATEWAY CONFIGURATION

Ubiquiti UDM - Port Forwarding & NAT


• Not all gateways/firewalls are the same. However, they all share the same concept. If you have a VPS that manages the network, please follow their resources.
• Ubiquiti UDM like most, automatically creates NAT rules for your port forward rule.

  1. Login to your gateway/firewall. Alternatively go to your network configuration settings on your VPS. 
  2. Find port forwarding via your manufacture's manual. 
  3. Create a new port forwarding rule.
  4. Name your rule.
  5. Set a forwarding IP, i.e 192.168.1.250
  6. Set incoming port and bind it to the forward port i.e 27017-27025.
  7. Set all traffic UDP.
  8. Save.

    [Image: DfCqUwo.png]

    • If you have any issues, try these steps over again. Review it closely, Windows Firewall is a learning curve sometimes.