Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a small server at home that I plan on putting a few game servers on, but I want to make sure only people from my country can join it.

Is it possible to filter connection attempts to my server based on port? Say a game runs on port 12345, could I block all international traffic to that single port?

share|improve this question

migrated from serverfault.com Aug 3 '10 at 13:22

This question came from our site for system and network administrators.

    
What OS are you running ? –  topdog Aug 3 '10 at 9:46

2 Answers 2

up vote 0 down vote accepted

Well, of course it is possible, you simple need a database like Maxmind or IPLocation (http://www.ip2location.com), there you will find the information needed.

Regarding the port, you can use any opensource firewall to filter any access to that port coming from outside your country.

share|improve this answer

I don't think IPv4 is geographically distributed, so unless you have a database of "national" or "international" IPs, it's a no go.

share|improve this answer
1  
Actually, it is. IP-Ranges are getting assigned to the ISPs, which are (most of the time) located in one country. –  Bobby Aug 3 '10 at 13:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.