Do you have a reverse proxy? You might need to configure things so that the real ip addresses are passed to discourse.