Ubuntu: Ubuntu Server 14.04 LTS + ASUS AC68U router trafic redirection / filtering / remove ads


I have just added a HP Gen8 Microsever to my lan set-up and I'm wondering if there's a possibility to set it up in such a way that http traffic is automatically filtered for ads.

Details on the set-up:

  1. ASUS RT-AC68U router acting as a gateway and AP with PPPOE conection to my ISP
  2. HP Gen8 Microserver acting as NAS and media server (plexmediaserver, samba share, deluge bit-torrent with web interface and remote connections)
  3. Multiple LAN clients (static & DHCP)
    • Windows
    • Linux
    • iOS

The endgame is:

  1. ads are automatically removed for a discreet list of lan clients (or all of them) using privoxy set up on the hp server (or the rotuer itself as a last resort)
  2. ideally, without the need to specify a proxy
  3. very important: keep the router as a gateway and somehow redirect traffic towards the hp micro server for filtering; basically, the current lan set-up should remain the same, with only new rules and services added. The server should remain LAN only and not be directly exposed to the Internet.
  4. any new client that is added to lan, either via dhcp or static will have ads automatically removed

More details on the actual setup:

  • ASUS AC68U - lan gateway -
  • HP server - static ip - on em1; em2 is currently not connected
  • Main desktop - windows - static ip -
  • iOS clients - set up dhcp - range -


  • iOS clients asks gateway : "what's the time?"
  • the gateway forwards to the Internet
  • the Internet responds: "the time is 15:04. Here are some ads to go with your info"
  • gateway forwards to the hp server
  • server get the message and removes the "ads" part
  • iOS client gets the answer: "the time is 15.04."

I'm fairly new to Linux, so please excuse if I'm way off base here. Also, I wouldn't mind installing a custom firmware on the router if it is required.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »