In Germany you are allowed to discriminate on all not protected factors.
protected factors are: race or ethnic background, gender, religion or belief, disability, age, or
sexual orientation.
belief has a very high bar to meet, you are for example still allowed to discriminate against members of a political party.
discriminating based on location matching ip adress or not doing business with certain countrys is fully legal