How to whitelist ip to a specific domain

I have owncloud installed on my linode. I was wondering if it was possible to set an iptable rule to only allow my ip address to that subdomain. I was thinking about doing it by port, but it uses https so I would have to allow 443. Does anyone have any options?

4 Replies

What you are asking is not really possible with iptables. You can, however, restrict access to certain IP addresses using your web server configuration.

For Apache 2.4, you would use a Require directive; if you're using Apache 2.2, there is an older syntax using Allow, Deny, and Order. I presume that nginx can do this, but don't know how to configure it.

OK. Thank you for responding. This helps me change direction in my research on this. I'm running nginx. So now I just need to figure out how to do it from there.

Thanks.

Explained here:

http://nginx.com/resources/admin-guide/ … ng-access/">http://nginx.com/resources/admin-guide/restricting-access/

awesome! thank you. this is what i need.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct