Skip to main content

Configure Windows Firewall to allow Java-based application

This article is intended to guide you through configuring Windows firewall to allow Java-based applications using port 7775

Updated over a year ago

How to configure Windows Defender Firewall on both Windows 10 and Windows 11 to allow your Java-based application and its port to work correctly.

General Considerations

  • Port Number: You'll need to know the specific port your application uses for communication. If you don't, check the application's documentation or settings. For OmniPACS Router the port needed is 7775

  • Administrator Privileges: You'll likely need administrator access to make these changes.

Windows 10

  1. Open Windows Defender Firewall
    Search for "Windows Defender Firewall" in the Start menu and click on it.

  2. Advanced Settings:
    In the left-hand menu, click on "Advanced Settings."

  3. Inbound Rules:
    In the left-hand menu, click on "Inbound Rules."

  4. New Rule:
    In the right-hand actions pane, click on "New Rule."

  5. Rule Type:

    Select "Port" and click "Next."

  6. Protocol and Ports:

    Choose whether your application uses TCP or UDP (consult your application documentation).
    ​

    Under "Specific local ports," enter the port number your application uses.
    ​

    Click "Next."

  7. Action:

    Select "Allow the connection" and click "Next."

  8. Profile:

    Choose the profiles to which this rule should apply (Domain, Private, Public, or any combination)

    Click "Next."

  9. Name:
    Provide a descriptive name for your rule (e.g., "[Application Name] Inbound Rule") and click "Finish."

Windows 11

The process is very similar to Windows 10:

  1. Open Windows Defender Firewall:

    Search for "Windows Defender Firewall" in the Start menu and click on it.

  2. Advanced Settings: Same as Windows 10.

  3. Inbound/Outbound Rules: The rest of the process is identical to the steps for Windows 10, focusing on creating a new Inbound Rule.

Additional Tips

  • Java Executable: If you're having trouble, consider adding the Java executable itself (java.exe or javaw.exe) to the list of Allowed Apps instead of just specifying the port. This is sometimes a broader solution.

  • Application-Specific Guidance: Check your application's documentation for any specific firewall configuration recommendations.

Important Security Notice: Remember that opening up ports in your firewall does introduce some security risk.

Make sure you trust the application and limit the scope of the rule (e.g., only applying to the private network) whenever possible.

Did this answer your question?