Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-07 07:17:36

jauhari
Member
Registered: 2007-05-24
Posts: 97
Website

How to Restrict Content just from some IP.

Hi All

I have few question about it,
I want manage my TextPattern, and I try to split my content between intranet and internet, so I want some article category only show up from some IP range, example from (169.254.216.x, 192.168.x.x)

So, if some one that access my server from internet they will not show my restrict IP content. How to do it?

Thanks

Offline

#2 2007-08-07 23:58:48

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: How to Restrict Content just from some IP.

I looked at something similar a while back and was looking into blocking IP ranges via htaccess and redirecting them to either a login page or other page if they were unauthorised, or allowing access if their IP address was within the range…

This would have been from using 2 separate installs of textpattern – not sure how it would work with a single install – I was also quite surprised at how little code would have been needed for this – so maybe it wasn’t the most secure method… but it worked

Offline

#3 2007-08-08 22:56:50

jauhari
Member
Registered: 2007-05-24
Posts: 97
Website

Re: How to Restrict Content just from some IP.

Any other solutions please?

Offline

#4 2007-08-09 05:30:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: How to Restrict Content just from some IP.

what about using password protect?

there’s the built in method and the plugin

Last edited by colak (2007-08-09 05:31:02)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2007-08-09 11:10:29

jauhari
Member
Registered: 2007-05-24
Posts: 97
Website

Re: How to Restrict Content just from some IP.

I want make it smooth without user/visitor now about it.
Is it possible?

Offline

#6 2007-08-10 00:07:31

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: How to Restrict Content just from some IP.

I’m assuming that the Intranet access will be from a single IP (maybe not… but mod_access should be able to do what you want)

Read the apache manual for ‘mod_access’ http://httpd.apache.org/docs/1.3/mod/mod_access.html

Honestly – its seamless – I did tests and it worked perfectly – when I logged in to my site from my IP address – I was allowed straight into the site, when anyone else logged in – they were redirected to where ever I wanted…

Offline

Board footer

Powered by FluxBB