Here's the situation. I am using the Asus RT-N16. I have a computer on my network that I want to block access to the internet… but not through access restriction. The reason I don't want to do it through access restriction is because it doesn't let the user know that they are being blocked; it basically just times out the request. I would like to specify a landing page for a particular IP address or MAC address on my network so when they try to access the internet it redirects them to the landing page I've specified (telling them they are blocked). Is this possible through dnsmasq, or any other techniques you can think or? I have a local web server to serve up pages, and other resources if anyone has a creative solution let me know.
Date: 13 Apr 2011 03:45
Number of posts: 5
RSS: New posts
Not really sure how this could be accomplished via Tomato GUI but that would be a nice feature to add that way people would know what's going on if you wanted it set up that way… Most people use this feature to block kids and don't really want them aware of what's truly going on.
As far as command line goes to simply route it over to your server and display the page of your choice. Look at this page.
In case for some reason that page goes down in the link I provided, you're basically looking to add this to your iptables.
iptables -t nat -A PREROUTING -s 192.168.1.2 -p tcp —dport 80 -j DNAT —to-destination 192.168.1.100:80
192.168.1.2 is the computer you're wanting to block.
192.168.1.100 is the web server you're directing them to.
Where do I implement this code? Do I execute it as a system command? Or do I execute it in dnsmasq?