顯示具有 networking 標籤的文章。 顯示所有文章
顯示具有 networking 標籤的文章。 顯示所有文章

2018年5月15日 星期二

[How To] install adblock in openwrt or LEDE

As we know some of the wireless devices cannnot install adblock plugin such as iphone and iPad. We can modify our routers to add adblock in our open source routers.

So how to do it:

The following packages is needed:
1. adblock (the adblock package)
2. libustream-mbedtls (For https download using uclient-fetch)
3. luci-app-adblock (in case for luci interface)

    #opkg install adblock libustream-mbedtls luci-app-adblock

After installation, you need some configuration. For luci, you can find the configuration in homepage-> "Service" Tab -> "Adblock"

enable the host that you need to.

for command line configuration
you need to: (I come from Hong Kong, so I block the reg_cn)
    #/etc/init.d/adblock enable 
    #/etc/init.d/adblock start
    #uci set adblock.global.enabled='1'
    #uci set adblock.reg_cn.enabled='1'
    #uci commit

To verify correct installation
In the log tab in Adblock luci page:
    Tue May 15 14:25:18 2018 user.info adblock-[3.4.3]: blocklist with overall 29670 domains loaded successfully (NETGEAR WNDR3700v4, LEDE XXXXX)
or the same line shown in command line
    #logread |grep adblock

from client side, try ping "analytics.google.com"
    $ ping analytics.google.com
    ping: analytics.google.com: Name or service not known


Conclusion
This adblock is not as good as the browser plugin one as it just block the advertisment hosts. But at least your private information will not be sent to those ad servers.

Cheers

2015年3月15日 星期日

[How To] Bridge network interfaces using netctl

There are some ways to bridge network interfaces. The most popular one is "brctl". Other than brctl and we can use netctl to preform this task. relativly easy with easier settings.

1. Create a configuration file
# cat /etc/netctl/bridge
Description="Example Bridge connection" 
Interface=br0 
Connection=bridge 
BindsToInterfaces=(enp3s0 snp3s1) 
IP=static 
Address='192.168.1.1/24' 
#Gateway='192.168.10.200' 
## Ignore (R)STP and immediately activate the bridge SkipForwardingDelay=yes 

2. Just start it
# netctl start bridge

3. If it works fine, just enable it during boot
# netctl enable bridge

Nice and done.

a good reminder that the interfaces in the bridge should be disable the DHCP settings.