0

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.

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

2 Answers 2

1

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
</Directory>

if your VPN is 10.8.0.0/24 and your wireless is 192.168.7.0/24.

0

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.

https://httpd.apache.org/docs/2.0/mod/mod_access.html#allow

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .