I think geo blocking is legal, if it's blanket blocking. However, blocking based on DNT header is probably coercive — even if country is mentioned as excuse.
Consent must be "freely given", which means you have not cornered the user into agreeing to you using their data. Requiring consent to data processing therefor excludes consent. You need to be able to say no.
https://gdpr.eu/gdpr-consent-requirements/
Consent must be "freely given", which means you have not cornered the user into agreeing to you using their data. Requiring consent to data processing therefor excludes consent. You need to be able to say no.