Blocked by Brandmauer


(cinematik) #1

Every time I run

go run main.go

I get: brandmauer has been blocked some functions ot the program. Then I hit “Allow” for the current run and the iisue is solved, but next time I run the same program and it blocked again.

How to allow it for windows Brandmauer?


(Norbert Melzer) #2

Disable brandmauer.

Or use go build and run the binary from the static output path rather than the dynamically created by go run.


(cinematik) #3

Is it possible to disable brandmauer fot the golang binary only?


(Norbert Melzer) #4

I do not know anything about Brandmauer. But most personal firewalls do exclusion rules on the path of the binary, everyone you use go run the path were the binary will be written to and then run will be different.

If though you use go build and then run your binary from were it was build to, you have a static path which remains the same each time. Then your firewall should recognize the exception rule you added (if you did so permanently) and let it run.


(Johan Dahl) #5

It is the windows firewall which asks if it is ok to make an exception for a program listening on a port. Instead of using http.ListenAndServe(":80", nil) can one listen only on localhost/127.0.0.1 while development. Like this http.ListenAnServe(“127.0.0.1:80”, nil)


(cinematik) #6

Yea, that’s seems to be a solution.


(system) closed #7

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.