Blocked by Brandmauer

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?

Disable brandmauer.

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

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

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.

1 Like

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)

1 Like

Yea, that’s seems to be a solution.

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