I've got a website on the web which i simply want to be around from the house.
Could I've htaccess be limited to the MAC address of my router? Otherwise, are there more options?
I do not think I possibly could use Ip because my Web service provider changes it constantly.
You cannot make use of the MAC since it will not work through the following router. Usually, even when you've got a dynamic IP, your Web service provider provides you with a hostname that's fixed, something similar to
customer1337.newyork.bestisp.com. See what it is here, and employ that within the htaccess.
Because you cannot make use of your MAC address or perhaps your Ip, your very best solution is by using DNS to keep a number record. You should use dyndns or freedns to setup an engaged dns record. Many hubs nowadays really permit you to configure your router to ping these websites to improve your host record.
Suppose on freedns.afraid.org you arrange it to ensure that gregmyhome.mooo.com indicates your router. You'll be able to update the htaccess file to permit access from that hostname. Apache will work a reverse dns research upon your going to the website, and allow you to in.
I'll say, however, there might be a delay which may lead you to be restricted for a while. This issue may pressure you to definitely turn to other authentication systems, for example digest auth, client certificate, as well as ssh tunnelling.
Additionally to Bart, you can only use b .htpasswd file and hang a account information for that site, to ensure that solve these questions . login.
you most likely could but that is not what htaccess is perfect for, for me. unless of course you place up authentication using htaccess. however your site is going to be accessible from everywhere which has the password.
iptables can perform mac address blocking though. why not set that up?
therefore if your router's mac is abc,
first set the default policy:
iptables -P INPUT DROP
then particularly allow yours:
iptables -A INPUT -p tcp –destination-port 80 -m mac –mac-source xyz -j ACCEPT