IPTV DD-WRT Netgear WNDR3400 over WI-FI http udpxy

My ISP provides free IPTV channels via IGMP multicast, but I'm able to watch only over copper LAN cable, and during watch my network lies down... :(

Most of us are aware multicast traffic do not friend with mobile devices and Wi-Fi as well.

This tutorial is how to relay UDP multicast traffic to http using free udpxy daemon.
Fortunately I have Netgear WNDR3400 with latest DD-WRT firmware and I'm able to run udpxy daemon on it!


Here are simple steps to make IPTV work on any mobile device (Android, IOS) over WI-FI 5 Ghz or 2.4 Ghz my router has both :) 
I advice to use 5Ghz, performance is much better especially if you are watching HD quality...

UDPXY Introduction:
udpxy is a UDP-to-HTTP multicast traffic relay daemon: it forwards UDP traffic from a given multicast subscription to the requesting HTTP client.
udpxy is free and open source: it is licensed under GNU GPLv3. This quick guide explains the license in easily understandable terms.
udpxy was written to build on POSIX-compliant systems, with the minumum of external dependencies and configuration steps; 
it was also designed to maintain a small memory footprint and run on devices with limited resources (CPU, RAM).

First of all we need to install udpxy to our DD-WRT router, we need to enable ipk repository & mount usb flash drive, 
I have chosen my old 1Gb usb flash formatted as FAT32, it is more than enough...:)

after we successfully mounted usb flash to the system we will be able to install udpxy via ipk:

[email protected]:~# ipkg update
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/brcm47xx/generic/packages/Packages ...
Connecting to downloads.openwrt.org (
Updated list of available packages in /jffs/usr/lib/ipkg/lists/attitude

[email protected]:~# ipkg list | grep udpxy
udpxy - udproxy makes it possible to convert UDP IPTV streams into http
[email protected]:~# ipkg install udpxy
ipkg_depends: Warning: libc mentioned in dependency but no package found in /jffs/usr/lib/ipkg/lists

Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/brcm47xx/generic/packages/udpxy_1.0.21-2-1_brcm47xx.ipk ...
Connecting to downloads.openwrt.org (
ipkg_depends: Warning: libc mentioned in dependency but no package found in /jffs/usr/lib/ipkg/lists
Unpacking udpxy...Done.
Configuring udpxy...Done.
[email protected]:~# ipkg install http://downloads.openwrt.org/attitude_adjustment/12.09/brcm47xx/generic/packages/libc_0.9.33.2-1_brcm47xx.ipk
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/brcm47xx/generic/packages/libc_0.9.33.2-1_brcm47xx.ipk ...
Connecting to downloads.openwrt.org (
Unpacking libc...Done.
Configuring libc...Done.

#end log
Then we need to disable firewall & allow multicast traffic...


Then we need to apply start up script & iptables rules:

start up script:
cd /tmp
sleep 60
/jffs/usr/bin/udpxy -a `nvram get lan_ipaddr` -p 4022 -m `nvram get wan_ipaddr` -B 1Mb -M 30

firewall startup:

iptables -I INPUT -i vlan2 -p udp -d --dport 15701 -j ACCEPT
iptables -D INPUT -p igmp -j DROP

-M 30 - периодически возобновлять подписку на мультикаст-канал [по
умолчанию - 0 (секунд), т.е. не возобновлять]
-p 4022 - порт на котором UDPXY принимает подключения (если занят, можно указать любой другой незанятый)
-B 1Mb - буфер UDPXY (мне хватает одного мегабайта)
-i vlan2 - интерфейс на который провайдер вещает IPTV (у меня этот, у вас может быть другой) --dport 15701 - подсеть и порт с которой вещают IPTV
iptables -D INPUT -p igmp -j DROP - это удаляет в IPTABLES правило режущее igmp трафик.(у меня без него не показывает) 

Status Web:

not connected:
udpxy_status2 users connected:

next step is to prepare m3u list of channels, my IPS is Citynet & I have download latest m3u list here:


we need to modify it for http addresses by changing these:

udp:[email protected]:1234
you can use CTRL+H in notepad :)

I have saved ready example of CityNet.m3u here:


For Android devices I have used IPTV app (Alexander Safronov) but you can use another...

for windows I use VLC :)
utilization of my router is very poor...


Android screen capture:

[email protected]

# date
Tue Sep 27 16:36:47 EDT 2016

Root, TWRP Bootloader & CM 12.1 on Samsung Galaxy Tab 10.1 (Android 4.1.2)

We have a Samsung Galaxy Tab 10.1 GT-N8013 with pre-installed Android 4.1.2 and need to become root in case if we want to install custom firmware like a Cyanogen Mode 12.1.

Root using Odin (I have used version 3.11):

  1. Download and Install Samsung USB Driver on your computer. Is it’s already installed then Skip this Step.
  2. Download Root files including Odin 3.11 from this link https://androiddatahost.com/101q2
  3. Switch Off your Tab
  4. Go to Download Mode. To boot into download mode Press and hold Volume Down Key and Power Key at same time for 5-8 seconds until download mode is active.
  5. In the download mode you will be able to see a Warning Yellow Triangle Sign. Press the Volume UP Key to continue.
  6. Open Odin3 and connect Tab to the computer.
  7. Odin will automatically recognize the device and show Added message at the lower-left panel.
  8. Click on the PDA (AP) button and select CF-Auto-Root.tar (you have downloaded it in the step#2)
  9. Click the Start button in Odin to begin the Flashing.
  10. Flashing usually takes 30-50 seconds to complete the rooting process on Samsung Galaxy Tab 10.1 GT-N8013. Once rooting process got completed, you will be able to see a Green Box with Pass written on it in Odin. During this process Tab will re-boot automatically.
  11. Once you see, the Pass message in Odin, you can disconnect Device from the computer.
  12. Now to make sure that we have successfully rooted Samsung Galaxy Tab 10.1 GT-N8013, open Applications Menu and find SuperSu App. If this app exists on your Tab, then it means you have successfully rooted your device. Congratulations! :)


TWRP Bootloader and CM 12.1 installation

  1. Download Custom Recovery, it is recommended to use last version ofTWRP. I used this link https://dl.twrp.me/p4noterf/twrp-
  2. Enable USB debugging feature on your Tab.
  3. Open Odin3 and connect Tab to the computer.
  4. Click on thePDA (AP) button and select twrp- (you have downloaded it in the step#2)
  5. Click the Start button in Odin to begin Recovery image installation.
  6. Once Recovery installation got completed you will again seeGreen Pass
  7. Now download you CM 12.1. I used unofficial version from this linkhttps://www.androidfilehost.com/?fid=24459283995296942
  8. Copycm-12.1-20160315-UNOFFICIAL-n8013.zip on your external SD card inserted in your Tab.
  9. Reboot you Tab and Go to Recovery mode by Press and HoldVolume UP Key and Power Key
  10. In TWRP Recovery go to Wipe and WipeCache, Dalvik Cache and System.
  11. Then Go toInstall and choose CM 12.1 that you have just copied. Wait for the installation to be completed. Tab will be rebooted automatically. Congratulations, CM 12.1 (Lolipop 5.1) successfully installed


For proper completing installation you still need to do following two steps:

  1. Enable Hardware keyboard input in system Settings (default keyboard is not working in this build)
  2. Install actual GAPPS package for using google Services. This can be done by downloading and copying. Use this resources to find more useful package for youhttp://www.technobuzz.net/download-android-5-1-1-google-apps-for-cm-12-or-any-custom-rom/


# date
Tue Sep 20 16:47:18 AZT 2016

CentOS 6 mount disk Mac OS Extended (HFS+) support

The Community Enterprise Linux Repository provides a kmod driver package for that. 
Just add the repository and install the package kmod-hfsplus. 
This driver allows the mounting of HFS+ partitions with full read-write access.


# parted -l /dev/sdc

Model: HGST HTS 721010A9E630 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name                  Flags
 1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot
 2      210MB   1000GB  1000GB  hfs+         G-DRIVE mobile USB

# export http_proxy=http://rhn.belomor.nl:3128
# export https_proxy=http://rhn.belomor.nl:3128

# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
# yum install kmod-hfsplus

# mount -t hfsplus -o force -o rw /dev/sdc2 /sepish


# date
Fri Sep 16 21:31:18 AZT 2016

How to convert KVM guests from LVM to qcow2 & Migrate to another KVM host via NFS

[[email protected] ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
c1:83:ac:fe:89:31:40:49:87:a6:d4:cb:3c:9e:23:80 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|  o..            |
| oo+ . o         |
|oo= . o +        |
|E. = .   o       |
|. o +   S        |
| . *             |
|  . =            |
|     = .         |
|    . o          |

[[email protected] ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
[email protected]'s password: 
Now try logging into the machine, with "ssh [email protected]'", and check in:


to make sure we haven't added extra keys that you weren't expecting.

[[email protected] ~]# ssh [email protected]
Last login: Thu Sep  8 18:44:33 2016 from source-kvm
[[email protected] ~]# id
uid=0(root) gid=0(root) groups=0(root)

Create nfs relationship export nfs on dest server:
[[email protected] ~]# cat /etc/exports 
/data/iso    ,sync,no_root_squash,no_subtree_check)

Mount NFS of destination server:

[[email protected] ~]# mount /my_kvm

Convert LVM to qcow2 image to dest server:
If you want the image compressed add '-c' right after the word convert...

[[email protected] ~]# qemu-img convert -c -O qcow2 /dev/vol_group_vm/vm.belomor.nl/ /my_kvm/vm.belomor.nl.qcwo2

Dump xml file of kvm VM:

[[email protected] ~]# virsh dumpxml vm.belomor.nl > vm.belomor.nl_dump.xml

Copy xml to dest server:
[[email protected] ~]# scp vm.belomor.nl_dump.xml [email protected]

Edit the xml for the image

[[email protected] ~]# virsh edit vm.belomor.nl

cnahge from:
<source dev='/dev/vol_group_vm/vm.belomor.nl'/>

<source file='/data/iso/vm.belomor.nl.qcwo2'/>

[[email protected] ~]# virsh define vm.belomor.nl.xml

[[email protected] ~]# virsh start vm.belomor.nl
[[email protected] ~]# date
Thu Sep  8 21:42:35 AZT 2016


Cacti 0.8.8h RHEL 7 Spine 1 minute polling

# subscription-manager config --server.proxy_hostname=rhn.belomor.nl --server.proxy_port=3128

# cat /etc/rhsm/rhsm.conf 

# subscription-manager register --username RHN-USER --password PASSWORD --auto-attach

# export http_proxy=http://rhn.belomor.nl:3128

# export https_proxy=http://rhn.belomor.nl:3128

Where to find the php-(devel,bcmath,dba,imap,mbstring,snmp,process) packages for Red Hat Enterprise Linux 7
The named packages are now located in the 'Optional' channel, to which the system in question must be subscribed in order to download and install them.

# yum-config-manager --enable rhel-7-server-optional-rpms

# mysqladmin -u root password Uy7yt5675h6^40

# for i in `find ../rra -name "*.rrd"`; do rrdtool dump $i > ./$i.xml; done
# tar czf cacti-xmlRHEL7.tar.gz ../rra/*xml
# mysqldump --user=cacti --password=cactipar0l cacti > ./cacti_backup.sql

# tar zxvf cacti-xmlRHEL7.tar.gz 
# for i in `find -name "*.xml"`; do rrdtool restore $i `echo $i |sed s/.xml//g`; done

# mysql -u root -p

create database cacti;
GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY 'c4ct1par0l';
FLUSH privileges;

# mysql -u cacti -p cacti < /root/cacti_backup.sql

############# 1 minute polling with spine
# cat /etc/cron.d/cacti 
#*/5 * * * *    cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
*/1 * * * *     apache  /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

On your Cacti web interface - Console > Data Templates
Change the template "step" to 60 (this is in seconds = this is already the 1 minute polling interval)
Change "heartbeat" to 120 for both traffic_in and traffic_out and save
Go to Console > Cacti Settings > Poller tab
Change the Poller Interval and Cron Interval to "Every Minute" and save
On Console > Utilities , click on Rebuild Poller Cache
On Console > Data Sources > RRAs, define the number of rows you want to maintain a 1 minute data.
Note: For those existing graph with 5-min polling interval, you need to re-create the graph or just simply delete the associated rrd files, thus losing your historical data.

############SPINE INSTALL RHEL 7

# rpm -qa | grep cacti

# wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8h.tar.gz

# tar -xzvf cacti-spine-0.8.8h.tar.gz 

# cd ./cacti-spine-0.8.8h

# ./bootstrap

# ./configure
# make
# make install

# cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf
# vi /usr/local/spine/etc/spine.conf

DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass c4ct1par0l
DB_Port 3306
DB_PreG 0

############SPINE INSTALL RHEL 7

Login to your Cacti instance and go to:
Console -> Settings -> Poller

Change the “Poller Type” to “spine”.
Provide poller file path:
default is:

You’re cacti instance is now using the spine poller.

############# 1 minute polling with spine

# date
Wed Sep  7 11:15:30 AZT 2016

Cisco IOS SSH2 Config

switch(config)# hostname belomor
belomor(config)# ip domain-name belomor.nl
belomor(config)# crypto key generate rsa (1024 is ok)
belomor(config)# line vty 0 4
belomor(config-line)# login local
belomor(config-line)# trasport input ssh
belomor(config)# ip ssh version 2
belomor(config)# ip ssh time-out 20s
belomor(config)# ip ssh authentication-retries 2 (how many time one can try with wrongly)

Web Filter for Squid Proxy Quintolabs KVM qcow2 convert


[root@]# aria2c -x 16 http://packages.diladele.com/qlproxy/
[root@]# mkdir ./quintolab
[root@]# mv ./websafety.zip ./quintolab/
[root@]# cd ./quintolab/
[root@]# unzip ./websafety.zip
[root@]# cd ./websafety

[root@]# ll
total 4168076
-rw-r--r--. 1 root root 1233167360 May 18 16:29 websafety-disk1.vmdk
-rw-r--r--. 1 root root 133 May 18 16:29 websafety.mf
-rw-r--r--. 1 root root 8595 May 18 16:29 websafety.ovf
[root@]# du -sh ./*
1.2G ./websafety-disk1.vmdk
4.0K ./websafety.mf
12K ./websafety.ovf

[root@]# qemu-img convert websafety-disk1.vmdk -O qcow2 websafety-disk1.qemu

Example of VM:
[root@]# virsh dumpxml Proxy-qu
<domain type='kvm' id='19'>
 <memory unit='KiB'>1048576</memory>
 <currentMemory unit='KiB'>1048576</currentMemory>
 <vcpu placement='static'>1</vcpu>
 <type arch='x86_64' machine='rhel6.6.0'>hvm</type>
 <boot dev='hd'/>
 <clock offset='utc'/>
 <disk type='file' device='disk'>
 <driver name='qemu' type='qcow2' cache='none'/>
 <source file='/iso/quintolab/websafety/websafety-disk1.qemu'/>
 <target dev='hda' bus='ide'/>
 <alias name='ide0-0-0'/>
 <address type='drive' controller='0' bus='0' target='0' unit='0'/>
 <controller type='usb' index='0' model='ich9-ehci1'>
 <alias name='usb0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
 <controller type='usb' index='0' model='ich9-uhci1'>
 <alias name='usb0'/>
 <master startport='0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
 <controller type='usb' index='0' model='ich9-uhci2'>
 <alias name='usb0'/>
 <master startport='2'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
 <controller type='usb' index='0' model='ich9-uhci3'>
 <alias name='usb0'/>
 <master startport='4'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
 <controller type='ide' index='0'>
 <alias name='ide0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
 <interface type='bridge'>
 <mac address='52:54:00:3d:95:fc'/>
 <source bridge='br0'/>
 <target dev='vnet3'/>
 <model type='virtio'/>
 <alias name='net0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
 <serial type='pty'>
 <source path='/dev/pts/5'/>
 <target port='0'/>
 <alias name='serial0'/>
 <console type='pty' tty='/dev/pts/5'>
 <source path='/dev/pts/5'/>
 <target type='serial' port='0'/>
 <alias name='serial0'/>
 <input type='mouse' bus='ps2'/>
 <graphics type='vnc' port='5903' autoport='yes' listen=''>
 <listen type='address' address=''/>
 <sound model='ich6'>
 <alias name='sound0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
 <model type='cirrus' vram='9216' heads='1'/>
 <alias name='video0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
 <memballoon model='virtio'>
 <alias name='balloon0'/>
 <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
 <seclabel type='dynamic' model='selinux' relabel='yes'>


nbtscan – NETBIOS nameserver scanner Centos 6 install & use

This is a command-line tool that scans for open NETBIOS nameservers on a local or remote TCP/IP network, and this is a first step in finding of open shares. 

Centos 6 install:
Go to http://pkgs.repoforge.org/nbtscan/ & find compatible RPM for your OS build...
[[email protected] ~]# wget http://pkgs.repoforge.org/nbtscan/nbtscan-1.5.1-1.2.el6.rf.x86_64.rpm
[[email protected] ~]# yum localinstall ./nbtscan-1.5.1-1.2.el6.rf.x86_64.rpm 
Loaded plugins: fastestmirror
Setting up Local Package Process
Examining ./nbtscan-1.5.1-1.2.el6.rf.x86_64.rpm: nbtscan-1.5.1-1.2.el6.rf.x86_64
Marking ./nbtscan-1.5.1-1.2.el6.rf.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: mirror.bakinter.net
 * epel: epel.scopesky.iq
 * extras: mirror.corbina.net
 * ovirt-3.6: ftp.nluug.nl
 * ovirt-3.6-epel: epel.scopesky.iq
 * ovirt-3.6-jpackage-6.0-generic: ftp.heanet.ie
 * updates: mirror.corbina.net
Resolving Dependencies
--> Running transaction check
---> Package nbtscan.x86_64 0:1.5.1-1.2.el6.rf will be installed
--> Finished Dependency Resolution
  nbtscan.x86_64 0:1.5.1-1.2.el6.rf                                                                                                                                                                                                         


[[email protected] ~]# nbtscan
Doing NBT name scan for addresses from

IP address       NetBIOS Name     Server    User             MAC address      
------------------------------------------------------------------------------   Sendto failed: Permission denied   DATA             <server>  DATA             00-00-00-00-00-00  <unknown>                  <unknown>        00-15-5d-c8-be-05  XXXXXXXXXX       <server>  <unknown>        00-15-5d-c8-be-06  xxxxxxx          <server>  <unknown>        00-15-5d-c8-be-03  xxxxx            <server>  <unknown>        e4-11-5b-12-0f-e4  DELLMINI         <server>  <unknown>        00-24-e8-b8-11-28  DESKTOP-xxx82I3  <server>  <unknown>        52-54-00-7b-f8-99  qwerty-PC        <server>  <unknown>        00-80-c8-3a-3d-15  MOKER            <server>  <unknown>        e4-11-5b-12-0f-e2  wertyyy-WKS      <server>  <unknown>        00-15-5d-c8-be-09    NPID3ED93                  <unknown>        2c-59-e5-d3-ed-93  ipwe             <server>  XXXX             00-00-00-00-00-00    xxxB6E249                  <unknown>        00-00-00-00-00-00
[[email protected] ~]# 

Fri Jul  8 12:06:53 AZT 2016
[email protected]