# How to disable access to anyone not coming from a specific IP address

**URL:** https://meta.discourse.org/t/how-to-disable-access-to-anyone-not-coming-from-a-specific-ip-address/114907
**Category:** Self-hosting
**Created:** [4월 13, 2019, 1:02오전 UTC](https://meta.discourse.org/t/how-to-disable-access-to-anyone-not-coming-from-a-specific-ip-address/114907 "2019-04-13T01:02:16Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![sat](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@sat](https://meta.discourse.org/u/sat)
#### Post date: [4월 13, 2019, 3:10오후 UTC](https://meta.discourse.org/t/how-to-disable-access-to-anyone-not-coming-from-a-specific-ip-address/114907/8 "2019-04-13T15:10:04Z")

</div>

@pfaffman thank you for the pointers.

I fixed it 🙂 Here is solution in case someone needs it.

1. `./launcher enter app` from /var/discourse folder
2. Go to '/etc/nginx/ folder and create file ‘whitelist-ip.conf’
3. add below lines in ‘whitelist-ip.conf’ file  
allow 192.168.1.1;  
deny all;
4. open `/etc/nginx/conf.d/discourse.conf`
5. go to line no 37 see below section, it is for port 443  
server {  
include /etc/nginx/whitelist-ip.conf;  
}
6. add line ‘include /etc/nginx/whitelist-ip.conf;’
7. Test NginX configuration by running command ‘nginx -t’
8. run ‘service nginx reload’

Try now, it will show not found page. no page related to discourse. from whiteliet ip address it will show normal forum.

---

_[View the full topic](https://meta.discourse.org/t/how-to-disable-access-to-anyone-not-coming-from-a-specific-ip-address/114907)._
