Project

General

Profile

auth request from DynDNS address

Added by Portisch over 11 years ago

Hi!

I have this config for lighttpd:

auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/jffs/opt/etc/lighttpd/lighttpd-htpasswd.user"

$HTTP["host"] =~ "(your.dyns.address.com)" {
$HTTP["url"] =~ "" {
auth.require = ( "" =>
(
"method" => "basic",
"realm" => "Bitte geben Sie Benutzername und Passwort für den geheimen Bereich ein. ",
"require" => "user=sps"
),
)
}
$HTTP["url"] =~ "^/cgi-bin(.*)$" {
proxy.server = ("" => (
("host" => "192.168.0.20", "port" => 80)
))
}
}

Lighttpd is running on my router with dd-wrt firmware.
When I now access the webserver from the internet by: http://your.dyns.address.com
The login screen does appear. This is working fine!

But how to filter the access by IP address? I have a fixed IP address from my provider. If I now enter http://my.fix.ip I can enter the webseite without authentication!

For the fix IP address it isn't realy a problem by adding it to the config, but what should I do if my wan IP is changing every time by my provider?