TV, VoIP telephone device and dd-wrt or tomato routers

Non release banter
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

TV, VoIP telephone device and dd-wrt or tomato routers

Post#1 by francois » 10 Feb 2017, 21:30

Since a while I have been kind of frustrated to get high monthly bills for the internet, TV and telephone services all offered by my ISP. I found an interesting thread (in french) which proposed to cut the bill at least by two, if not by three:
http://jeff.ecchi.ca/blog/2014/06/22/se ... par-annee/

The procedure does not seem to be reserved for newbies, but is not reserved to the advanced technician. I am opening this thread to share my experience, but also to have your feedback. I suspect that some of you are already installed.

1.0 ATSC HDTV.
Instead of cable TV you go for ATSC HDTV which provides a better an even better signal as the cable TV is somewhat compressed you will need a compatible TV in additon to an antenna. With the modern flat TV you should have a

- Antennas. There are a lot of DIY antennas proposed on the net both for indoor and outdoor use. Most hobbyist say that the antenna on the market are not worth the price. I have tried the fractal antenna and bow tie antenna and considered the log periodic antenna. There is a site which is more technical which conclude after some testing that fractal antennas are not worth the additional work, even though NASA would be fond of it.
http://www.antenna-theory.com/antennas/main.php
Practical uhf/vhf antenna by Peter Swallow:
http://lipcsey.gportal.hu/portal/lipcse ... _02956.pdf
- baluns to regulate the antenna:
http://www.antennamagus.com/newsletter-2-1.php

.. DIY bowtie, log periodic antennas:
https://www.youtube.com/watch?v=PtKnpjWmj_8
https://www.youtube.com/watch?v=BcUSW2l6MSI
http://www.vk2zay.net/article/43

Finally, it seems that the simplest the better: I will go for a simple bowtie antenna has proposed in the following video.
Bowtie antenna with rods: building and efficient installation to get the best signal:
https://www.youtube.com/watch?v=TX_wBmLQv5k
Double helix antenna coupled with loop antenna: building and tuning:
http://w6nbc.com/articles/2011-06QST2mhelices.pdf
http://www.zoomworks.org/fpv/helical_an ... structions


2.0 VoIP telephone service
Instead of of the ISP telephone services you go for VoIP device and VoIP provider. So that your VoIP telephone devices produces hi quality sound signal tomato software compatible router seems to be a needed option.

- VoIP device.
I went with the Grandstream GS-HT701 as VoIP device as proposed in the first link. It is reported as cheap and reliable:
http://www.whichvoip.com/phone-adapter-comparison.htm
3.0 dd-wrt and-tomato routers or open source routers:
http://www.dd-wrt.com/wiki/index.php/Supported_Devices
https://www.bestvpn.com/blog/17997/5-be ... s-for-vpn/

. definition of tomato software:
Tomato (firmware): cite note-18
- hardware
. Linksys N600 Dual Band Wireless Router (E2500-CA) is a cheap one in my country.
.. Quick installation guide:
https://adriel.co.nz/blog/2016/04/13/in ... -e2500-v3/

dd wrt and diy antenna:
http://www.skifactz.com/wifi/?p=107



How do you do with your TV services, are you on ATSC HDTV? Do you have other sources of TV material?
Do you use VoIP telephone service to cut your bill down? For a home installation, what would be the ideal tomato router?
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: TV, VoIP telephone device and tomato router

Post#2 by francois » 14 Feb 2017, 20:30

Maybe my favorite after lenghty readings, the linksys wrt54g is a tomato or dd-wrt or linux tweakable routers. This is the best paper I read on the subject:
https://arstechnica.com/information-tec ... r-linksys/
It delivers data over the crowded 2.4GHz frequency band and is limited to speeds of 54Mbps...

wrt54g compared to more recent linksys routers:
http://bestwirelessroutersnow.com/wrt19 ... rt3200acm/

Do you have a wrt54g? Is it good enough?

I want to handle 30 Mbps wifi on two floors of about 40x25 feet, each floor separated by walls?
Voltaire: Le mieux est l'ennemi du bien.

KnallKopf
Samurai
Samurai
Posts: 134
Joined: 18 Sep 2012, 20:56
Distribution: Porteus 64bit KDE4
Location: Absurdistan

Re: TV, VoIP telephone device and tomato router

Post#3 by KnallKopf » 23 Feb 2017, 17:43

TV:
I have stop watching for few years.

VoIP:
My tip (but i thing only for Germans because the shipping costs) is the O2 Provider OEM Router:
o2 Box 6431 with the real name Arcadyan VGV7510KW22.
see: https://wiki.openwrt.org/toh/arcadyan/vgv7510kw22
telefon support: https://forum.openwrt.org/viewtopic.php?id=62696

It costs second hand 1 - 5 EUR without shipping.
It is one of the few VDSL-Telefon-Routers that have full OpenWRT/LEDE support.
The 2 FXS ports support old pulsedialing-rotary-phones.
Asterisk a software-telefon-engine run on the router and brings so much possiblitis on it.
You can use the router for all your applications or as ATA-only or VDSL modem only.
The Router is very flexible but slow 100Mbps LAN and 2x2 Mimo bgn WLAN (no extern antennas).
The configuration are not trivial. (and Dangerous if you have no prepaid provider)

You should combine your problem with this problem phone calls thru the net: your strategy
Theoreticaly you can solved this via Asterisk DDNS, OpenVPN, Ekiga for Porteus and CSIP-Simple for Android.
But not tested and realy complex.

I Have put Asterisk-13 here: https://forum.porteus.org/viewtopic.php?f=49&t=6695

My aim is to bring friends and familar members to a OpenVPN and call them via SIP.
People are not outside the VPN should call direct via SIP or better SSL+SIP.
But the biggest problem is to make a easy solution for friends and familar members, and i thing i have to wait until VoIP is the only standart.

At the moment i use two providers
- One where i get a free local number for call in and for fallback if the other not working. in my case sipgate.de.
- One cheap Provider for call out one of the Dellmont group see: http://voip-comparison.com (0EUR mean not really zero, it mean free days for details you look first at the provider website)

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: TV, VoIP telephone device and tomato router

Post#4 by francois » 08 Mar 2017, 12:08

@KnallKopf:
Thanks for these practical informations on an European setting.

Informed advice from markds on most secure routers https://forum.porteus.org/viewtopic.php ... 4&start=45
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: TV, VoIP telephone device and dd-wrt or tomato routers

Post#5 by francois » 29 Mar 2017, 03:26

Finally, asus RT-N65U at about a 100$ seems better. Reported to work under tomato and dd-wrt:
https://www.amazon.ca/ASUS-RT-N66U-Dual ... ewpoints=1

It is an affordable alternative compared to more recent ac routers:
https://visitsteve.com/news/studio-log/ ... asus-n66u/
the N66U didn’t support wireless AC – but the only AC device I have is a phone, so that feature could wait.
the N66U didn’t support USB 3, which newer models do


- tomato installation on RT-N65U:
https://visitsteve.com/news/studio-log/ ... asus-n66u/
- tomato by shibby on RT-N65U (more complicated excet last post):
https://gist.github.com/joshenders/3941269
- if preffered to tomato, dd-wrt procedure for RT-N65U:
-installing openvpn on tomato router
https://billing.vpn.ht/knowledgebase/4/ ... outer.html
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: TV, VoIP telephone device and dd-wrt or tomato routers

Post#6 by francois » 16 Apr 2017, 03:20

I received that asus modem a week ago. Pretty soon, I should be out of the radar with a vpn installation. :D

I bought the wrong router for tomato or dd-wrt, I wil have to go for the padavan solution:
http://www.linksysinfo.org/index.php?th ... are.68231/
https://bitbucket.org/padavan/rt-n56u
https://www.snbforums.com/

admin and password
https://www.routerdefaults.org/asus/rt-n65u
Voltaire: Le mieux est l'ennemi du bien.

KnallKopf
Samurai
Samurai
Posts: 134
Joined: 18 Sep 2012, 20:56
Distribution: Porteus 64bit KDE4
Location: Absurdistan

Re: TV, VoIP telephone device and dd-wrt or tomato routers

Post#7 by KnallKopf » 24 Apr 2017, 23:17

bought the wrong router
which Router do you have buy ?
How is the complett modelnumber inclusive hardware version ?

I played a littelbit with the Easybox 803A and put LEDE on it.
It is a Router from the categorie less them 5EUR at ebay.
The Processor on this router is the predecessor of the vr9 Processor (that are inside the O2Box-6431).

I use this Router as ATA and connect them via WLAN + OpenVPN to the mainrouter.
It is now my officeline (ger: "Amstleitung") for this nice extension system ZwW-160 with this both telefons W48(west) and W38(east).
It is all from the 50s.
Image Image

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: TV, VoIP telephone device and dd-wrt or tomato routers

Post#8 by francois » 28 Apr 2017, 03:17

ASUS 3568A-RT-N65U

Very nice setting.Quite retro. :wink:
Voltaire: Le mieux est l'ennemi du bien.

KnallKopf
Samurai
Samurai
Posts: 134
Joined: 18 Sep 2012, 20:56
Distribution: Porteus 64bit KDE4
Location: Absurdistan

Re: TV, VoIP telephone device and dd-wrt or tomato routers

Post#9 by KnallKopf » 05 May 2017, 22:42

I bought the wrong router for tomato
To buying the right device is sometimes difficult because the exact Modelnumber and Hardware revision are important.
The Hardware Revision will normally not publish without asking when you buy a device.
A good example are the T-Com Speedport W724V there exist a type A, B and C all from different manufracturs with different hardware and different OSs.

"ASUS 3568A-RT-N65U" it is the Industry Canada ID
Here are full description of the Hardware: https://wikidevi.com/wiki/ASUS_RT-N65U

I like OpenWRT/LEDE, reason: i do not know other things like OpenWRT/LEDE.
What are the differences between OpenWRT/LEDE and DD-WRT and Padavan ?

After a 3/4 year of trying exist several problems:
1 - general problem is that openvpn and sip are really error prone and my friends and familar members want and can not help.
When i give them a Router is it a littlebit like to shoot them to the Mars, when the router are away and have no connection to it, no change to fix them.
I think i will do a look to fastd and some other technics that are used by the freeradio-community.
2 - my Internet connection are fast but in this case where the connection is loaded, the telefonie do not work.
I use traffic shaping for outgoning traffic it is simpel to use Type-Of-Service field for priority,
but for the incomming traffic i have to limiting the traffic.
The problem is that the incomming traffic-rate are not constant, it depends by how much load the router have and by the ISP.
Now I have limited my 100Mb/s rate to 60Mb/s.
I put the script on the end of my post.
Does everbody know a better iptables pattern for: Openvpn SIP RTP SSH and IAX2 ?
3 - In this case where openvpn negotiate a new key telefonie stops too.
Is there any change that openvpn negotiate a new key do not stop the old connection, only if a new key exist ?
4 - I have try Openvpn + Voip-Telephonie via GSM on a Mobil-WAN GPRS connection with tested 40Kb/s.
The GSM code are the smallest and should be a rate for 14Kb/s, but it does not work nevertheless.
Any idea how can i solve this ?

Code: Select all

#!/bin/sh



# install first:
# opkg update && opkg install tc iptables-mod-ipopt


# Variables
TC=$(which tc)
IPT=$(which iptables)
IP6T=$(which ip6tables)
#IPTMO="$IPT -t mangle -A POSTROUTING"
CMD=$1
DEV=$2 ; test -z "$DEV" && CMD=help

PORT_OWNVPN=1194
PORT_FEVPN="1194"



StopFilterRules1(){
    local chain chainlist
    chainlist="OUTPUT POSTROUTING"

    for chain in $chainlist ; do
	$IPT -t mangle -D $chain -j tcrule1_$chain 2> /dev/null
	$IPT -t mangle -F tcrule1_$chain 2> /dev/null
	$IPT -t mangle -X tcrule1_$chain 2> /dev/null
	
	$IP6T -t mangle -D $chain -j tcrule1_$chain 2> /dev/null
	$IP6T -t mangle -F tcrule1_$chain 2> /dev/null
	$IP6T -t mangle -X tcrule1_$chain 2> /dev/null
    done
}

StartFilterRules1(){
    local chain chainlist
    chainlist="OUTPUT POSTROUTING"

    for chain in $chainlist ; do
	$IPT -t mangle -N tcrule1_$chain
	$IPT -t mangle -A $chain -j tcrule1_$chain
	
	$IP6T -t mangle -N tcrule1_$chain
	$IP6T -t mangle -A $chain -j tcrule1_$chain
    done
}


StartTC_rules1(){
    local port
    StopFilterRules1
    StartFilterRules1

    # Outgoing Traffic from the servers to the clients
    $IPT -t mangle -A tcrule1_OUTPUT -p udp --sport $PORT_OWNVPN -j TOS --set-tos 0x14/0xff
    $IPT -t mangle -A tcrule1_OUTPUT -p udp --sport 5060:5063 -j TOS --set-tos 0x14/0xff
    $IPT -t mangle -A tcrule1_OUTPUT -p udp --sport 17000:18001 -j TOS --set-tos 0x14/0xff
    $IPT -t mangle -A tcrule1_OUTPUT -p tcp --sport 22 -j TOS --set-tos 0x10/0xff
    
    $IP6T -t mangle -A tcrule1_OUTPUT -p udp --sport $PORT_OWNVPN -j TOS --set-tos 0x14/0xff
    $IP6T -t mangle -A tcrule1_OUTPUT -p udp --sport 5060:5063 -j TOS --set-tos 0x14/0xff
    $IP6T -t mangle -A tcrule1_OUTPUT -p udp --sport 17000:18001 -j TOS --set-tos 0x14/0xff
    $IP6T -t mangle -A tcrule1_OUTPUT -p tcp --sport 22 -j TOS --set-tos 0x10/0xff
    
    
    
    # Outgoing Traffic from the clients to the servers
    $IPT -t mangle -A tcrule1_POSTROUTING -m tos ! --tos Normal-Service -j RETURN #---if TOS is set, leave it
    $IP6T -t mangle -A tcrule1_POSTROUTING -m tos ! --tos Normal-Service -j RETURN #---if TOS is set, leave it
    
    $IPT -t mangle -A tcrule1_POSTROUTING -p udp --dport 5060:5063 -j TOS --set-tos 0x14/0xff
    $IPT -t mangle -A tcrule1_POSTROUTING -p udp --dport 17000:18001 -j TOS --set-tos 0x14/0xff
    $IPT -t mangle -A tcrule1_POSTROUTING -p tcp --dport 22 -j TOS --set-tos 0x10/0xff
    
    $IP6T -t mangle -A tcrule1_POSTROUTING -p udp --dport 5060:5063 -j TOS --set-tos 0x14/0xff
    $IP6T -t mangle -A tcrule1_POSTROUTING -p udp --dport 17000:18001 -j TOS --set-tos 0x14/0xff
    $IP6T -t mangle -A tcrule1_POSTROUTING -p tcp --dport 22 -j TOS --set-tos 0x10/0xff
    
    for port in $PORT_FEVPN ; do
	$IPT -t mangle -A tcrule1_POSTROUTING -o $DEV -p udp --dport $port -j TOS --set-tos 0x14/0xff
	$IP6T -t mangle -A tcrule1_POSTROUTING -o $DEV -p udp --dport $port -j TOS --set-tos 0x14/0xff
    done
    
    # ingress filter # for Traffic that comes in
    tc qdisc add dev $DEV handle ffff: ingress
    # IPv4
    tc filter add dev $DEV parent ffff: protocol ip prio 10 	u32 match ip src 0.0.0.0/0 match ip protocol 17 0xff match ip dport $PORT_OWNVPN 0xffff	flowid :0	police pass
    tc filter add dev $DEV parent ffff: protocol ip prio 11 	u32 match ip src 0.0.0.0/0 match ip protocol 17 0xff match ip dport 5060 0xfffb		flowid :0	police pass
    tc filter add dev $DEV parent ffff: protocol ip prio 12 	u32 match ip src 0.0.0.0/0 match ip protocol 17 0xff match ip dport 17000 0xfc16	flowid :0	police pass
    tc filter add dev $DEV parent ffff: protocol ip prio 13 	u32 match ip src 0.0.0.0/0 match ip protocol 6 0xff match ip dport 22 0xffff		flowid :0	police pass
    #tc filter add dev $DEV parent ffff: protocol ip prio 10 	u32 match ip tos 0x16 0xff match ip tos 0x14 0xff match ip tos 0x12 0xff match ip tos 0x10 0xff	flowid :0	#police ok
    # IPv6
    tc filter add dev $DEV parent ffff: protocol ip prio 10 	u32 match ip6 src ::/0 match ip6 protocol 17 0xff match ip6 dport $PORT_OWNVPN 0xffff	flowid :0	police pass
    tc filter add dev $DEV parent ffff: protocol ip prio 11 	u32 match ip6 src ::/0 match ip6 protocol 17 0xff match ip6 dport 5060 0xfffb		flowid :0	police pass
    tc filter add dev $DEV parent ffff: protocol ip prio 12 	u32 match ip6 src ::/0 match ip6 protocol 17 0xff match ip6 dport 17000 0xfc16		flowid :0	police pass
    tc filter add dev $DEV parent ffff: protocol ip prio 13 	u32 match ip6 src ::/0 match ip6 protocol 6 0xff match ip6 dport 22 0xffff		flowid :0	police pass
    
    tc filter add dev $DEV parent ffff: protocol ip prio 30 	u32 match ip src 0.0.0.0/0 flowid :2			police rate 60mbit burst 500k drop
    tc filter add dev $DEV parent ffff: protocol ip prio 30 	u32 match ip6 src ::/0 flowid :2			police rate 60mbit burst 500k drop
}


StopTC_rules1(){
    $TC qdisc del dev $DEV ingress
    $TC qdisc del dev $DEV root
    StopFilterRules1
}


case $CMD in
start) StartTC_rules1 ;;
stop) StopTC_rules1 ;;
*) echo "Wrong command ! Use $0 start|stop device"
esac

exit 0


Post Reply