If you're running a web-app on port 8080 and don't want external users to see the app, how do you block it in Windows Firewall?

29
2013-07
  • Corduroy

    When I'm working on my app in a coffee shop, I want to make sure no one can see the app, which runs on localhost:8080.

    How do you configure Windows Firewall to block external connections to 8080 but still allow you to connect to the port on your own machine?

  • Answers
  • Toby Allen

    The answers to this question of mine on Stackoverflow.com allow you to set this up, however this is using Apache rather than IIS.

  • Mark Sowul

    Windows Firewall should be doing that automatically by default unless you explicitly open it. Which perhaps you have for when you're not at the coffee shop, but network profiles (Home/Work or Public) or what you want to use. If you have a rule allowing access to 8080, make sure it's enabled only for Home/Work and not for Public. Assuming that you use Public when connecting to an untrusted access point, which you obviously should.



  • view all most popular Amazon Coupons
    .

    Related Question

    security - Windows 7: Windows Firewall: Logging/Notifying on Outgoing Request Attempts
  • Maxim Zaslavsky

    I'm trying to configure Windows Firewall with Advanced Security to log and tell me when programs are trying to make outbound requests. I previously tried installing ZoneAlarm, which worked wonders for me with this in XP, but now, I'm unable to install ZA on Win7. My question is, is it possible to somehow monitor a log or get notifications when a program tries to do that if I set all outbound connections to auto-block, so that I can then create a specific rule for the program and block it.?

    Thanks!

    UPDATE: I've enabled all the logging options available through the Properties windows of the Windows Firewall with Advanced Security Console, but I am only seeing logs in the %systemroot%\system32\LogFiles\Firewall\pfirewall.log file, not in the Event Viewer, as the first answer suggested. However, the logs that I can see only tell me the request's or response's destination IP and whether the connection was allowed or blocked, but it doesn't tell me what executable it comes from. I want to find out the file path of the executable that each blocked request comes from. So far, I haven't been able to.


  • Related Answers
  • 8088

    You should be able to see this in Event Viewer. First you'll need to tweak the logging options in the Advanced Settings Console:

    alt text

    In the Event Viewer's left pane, expand to Applications and Services Log -> Microsoft -> Windows -> Windows Firewall with Advanced Security:

    alt text

    There, you can create a custom view and filter the log to only outbound connection attempts.