Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Im working on a (linux based) device that has 4 network interfaces: two wired, one wireless and a VPN. The device has a web 'control panel' of sorts that I want to restrict access to. Ideally it should only be accessible via the wireless and the VPN.

Should I be looking for an Apache setting or an iptables based solution?

EDIT: There won't be any other web access. The device will act as a router between ETH1 and ETH0 with UAP0 being a management only (local). VPN will provide remote management.

share|improve this question
What sort of access do you have to this "device"? Does it have iptables? If so that would be easiest. – Nathan C May 17 '13 at 18:10
Use the firewall(iptables) for restricting access at the network layer. – Zoredache May 17 '13 at 18:10

2 Answers 2

up vote 1 down vote accepted

Using iptables can be problematic if you intend to serve other web traffic. You can use Apache access controls to allow/deny access on that particular control panel.

Something like:

<Directory /www/docs>
  Require ip 10.8.0 192.168.7

if your VPN is and your wireless is

share|improve this answer

In apache you can configure to "deny from all" by default and then use the "allow from" directive to give certain ip's and ranges access. This would work mostly like the solution from cjc.

share|improve this answer

Your Answer


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.