upvoted.top:TP-Link N300 Wireless Wi-Fi Router

TP-Link N300 Wireless Wi-Fi Router, Up to 300Mbps (TL-WR841N)

1964

TP-LINK Technologies TL-WR841N Wireless Router – 300 Mbps TL-WR841N Routers & Gateways – Wireless. TP-LINK’s TL-WR841N Wireless Router is designed specifically for small family and home office networking. With optimal speed of 300Mbps you can handle tasks such as streaming music, uploading photos, video chatting, and all other basic online activity.

More details

Most upvoted comment

FCC Rules Block use of Open Source(r/technology)

I flashed OpenWrt onto my router and wrote a script which prevents ads from being displayed on any devices on my network that use DNS to find them on the internet. Chromecasts, phones, tablets, PCs, and (probably?) Rokus (I don’t have one to test with) can now all reach an ad-free internet without users needing to install any addons at all. I’m sure major corporations don’t want people doing this. I’ll link to my script on github if anybody’s interested in duplicating my setup.

Edit: Okay, the script is at github.com/tablespoon/fun/blob/master/adblocker.sh It’s written in such a way that installation is very simple: just place it anywhere permanent on the filesystem (don’t place it in /tmp — this is tmpfs in OpenWrt, and will be cleared if the router loses power or reboots. In my example below, I save it to root’s home) and run it once. It will add itself to root’s crontab, and will pull down new lists of known ad and malware servers every Tuesday at 3 am (plus a random delay to prevent load on the remote webservers). It also carefully adds itself to /etc/rc.local, so a server list refresh will also occur whenever you reboot your router.

My router is a TP-Link WR841N which has fairly limited storage… the largest partition after flashing OpenWrt ended up being /tmp, which is why I’m saving the blocklist there.

If you want to blacklist or whitelist any particular domains, simply add them to /etc/adblocker_blacklist or /etc/adblocker_whitelist and rerun the script.

Let me know if you have any questions.

Edit 2: In case anybody is interested, this is the router I’m using. www.amazon.com/TP-Link-Wireless-Router-300Mbps-TL-…

It’s running OpenWrt Barrier Breaker 14.07, which is (still) the latest full release as of this writing. openwrt.org/

Edit 3: Since people are asking, I wrote up some installation instructions to follow. This assumes you’ve already got OpenWrt running on your router (a guide for that can be found here: wiki.openwrt.org/doc/howto/generic.flashing). Please let me know if you run into any problems!

Edit 4: New version released. Improved security by expanding a sed regex to include all IP addresses (thanks to /u/Two_Coins and /u/Turbosack for the suggestion!) and added a random delay when invoked by cron to prevent undue load on the hostlist webservers (thanks to /u/Deckardzz for the suggestion!). Updated pastebin link and md5sum in the instructions below. If you already installed the old one, run ‘crontab -r’ and follow the setup instructions again to install the new version.

Edit 5: The mods responded. The post had been auto-moderated due to the Amazon link. They have graciously restored the post because it’s clear I’m not trying to sell this router. Thanks for the support, everyone! And thanks for being awesome, moderators!

Edit 6: New version released. Thanks to /u/minecraft_ece for suggesting the prevention of multiple simultaneous instances, the prevention of overwriting the block list if downloads mysteriously fail, and the automatic white listing of private networks (192.168.0.0 and 10.0.0.0). There have also been some minor performance improvements added, as well as a simplification of of the created crontab entry–jitter is now permanently defined because there was no reason to recalculate this each week. Finally, blacklist and whitelist parsing has been improved–previously, dots were erroneously treated as regex dots (wildcards) instead of periods. Full changes can be seen here: github.com/tablespoon/fun/commit/13adb0cf191194af0…

Edit 7: New version released. Thanks to yunake (github.com/yunake) for eliminating the misleading message from uci which occurs during installation on OpenWrt Chaos Calmer.

Pastebin link and checksum have been updated in this post to point to this version.


INSTALLATION

This assumes you’ve already got OpenWrt running on your router (a guide for that can be found here: wiki.openwrt.org/doc/howto/generic.flashing)

First, connect to your OpenWrt web interface and go to System -> Administration. Ensure that ssh is available on your LAN interface, enable password login, and allow root password login. Next, you want to ssh to your router. If you’re running Windows, you can use putty (www.chiark.greenend.org.uk/~sgtatham/putty/downloa…) to ssh to your router’s IP address. If you’re running OSX or Linux, just open a terminal and type ‘ssh root@192.168.1.1’ (or whatever the correct address is). Log in as root using the same password as you did for the web interface.

Once you’re in, you can use this command to download the script. It’s a little bit ugly… the OpenWrt-provided wget doesn’t support https, so I mirrored it at pastebin. Unfortunately, pastebin converts all newline characters to Windows-style newlines, so the awk fixes that. The initial cd selects your installation directory, and is included here for completeness–this can be any permanent location (don’t use /tmp; it exists in memory in OpenWrt).

cd /root/ wget -qO- pastebin.com/raw.php?i=kZuu4qJA | awk '{ sub(/r$/, ""); print }' >adblocker.sh 

Verify that your downloaded file matches mine exactly (to protect yourself). The checksum should be 36cfbb03ec7eb25c65329d940825407d:

md5sum adblocker.sh 

If it matches, make it executable and run it:

chmod +x adblocker.sh ./adblocker.sh 

After a small delay (mine takes about 10 seconds, but it will depend on your connection as well as the speed of your router’s processor), you should be returned to your prompt with no output at all. Finally, you can verify that it got installed by checking root’s crontab:

crontab -l 

You should see something like this (this is just example output; do not copy/paste this):

# Download updated ad and malware server lists every Tuesday at 3:22 AM 22 3 * * 2 /root/adblocker.sh 

If everything matches (other than the minutes after 3 AM — this is randomized for each installation to prevent load on the host list webservers), you’re good to go.

If you are still seeing ads, try flushing your device’s DNS cache. If you don’t know how to do this, just reboot it instead. (thanks, /r/mcplaty!)


UNINSTALLATION

This is quick and dirty, but should do the trick:

crontab -r sed -ri '/adblocker.sh/d' /etc/rc.local uci del_list dhcp.@dnsmasq[0].addnhosts="/tmp/adblocker_hostlist" && uci commit rm -f /tmp/adblocker_blocklist /etc/init.d/dnsmasq restart 

The first step clears root’s crontab (OpenWrt has an empty root crontab by default).

The second step removes the script from OpenWrt’s startup script.

The third step removes the blocklist from dnsmasq’s config.

The fourth step actually deletes the blocklist from your router (to free up a bunch of space).

The last step restarts dnsmasq to flush its cache.


If you’re using something other than OpenWrt, you may be in luck! I can’t personally vouch for any of these, but I’m including them to save you some time. They are reportedly good.

/u/nerdlymandingo shares this for dd-wrt users: www.reddit.com/r/bestof/comments/3izurp/tablspn_sh…

/u/mark3748 shares this for ASUSWRT-MERLIN users: www.reddit.com/r/bestof/comments/3izurp/tablspn_sh…

/u/goodtimes50 shares this for Tomato users: www.reddit.com/r/technology/comments/3iy9d2/fcc_ru…

More details about a product.

Additional Information

Subreddits

AdviceAnimals, talesfromtechsupport, technology

Number Of Links

3

Sum Of Upvotes

1139

Amazon Price

$19.23

NSFW Product

SFW

Product Type

Personal Computers

Type Code

NETWORKING_DEVICE

More details