OpenWRT/LEDE Project and Cisco VPN client in 4 easy steps

1. Install OpenWRT/LEDE project on your router and add vpnc, vpnc-scripts and luci-proto-vpnc using System | Software menu item




In my particular case I have setup router using WAN port attached to the modem and the client devices on LAN ports!

2. Add new interface myVPN using Network | Interfaces and change protocol to VPNC. Now you can setup VPN Server IP address, user name and password, group name and password. Important! In my case output interface is wan, because WAN port connected to outgoing modem!



and add myVPN interface to the lan firewall section of interface settings!



3. Switch now to the Network | Firewall and navigate to Custom Rules
You have to add forwarding rules for new myVPN interface



iptables -A forwarding_rule -o vpn-myVPN -j ACCEPT
iptables -A forwarding_rule -i vpn-myVPN -j ACCEPT
iptables -t nat -A postrouting_rule -o vpn-myVPN -j MASQUERADE

4. Add static routing to the subnetworks behind VPN connection as last step under Network | Static routes



Enjoy!

HOWTO: measure bandwith on AsteriskNOW (SHMZ, CentOS, Fedora)

iptraf allows to measure the throughput on network interface and watch individual connections.You can install iptraf with following command

# yum -y install iptraf

after start it displays as summary traffic as also detailed information about connections for NIC.

# iptraf



Other blogs recommend to install nload or iftop utilities, sadly both are not available in repository and you have to build from sources.

Enjoy!

Asterisk: HOWTO forward DNIS to remote party

Dialed Number Identification Service (DNIS) is a service that lets determine which telephone number was dialed by a customer.

Usually dialed number is known for subscriber, because each DID corresponds unique extension.
It is not a case for transfered calls, because information about DID will be lost. To inform far side about original dialed number the SIP protocol provides the Diversion header.
To set the Diversion field you have to set rdnis variable in dialplan. E.g.


;catch all extension
exten=>_.,n,Set(CALLERID(rdnis)=${EXTEN})

;in the macro
exten=>s,n,Set(CALLERID(rdnis)=${MACRO_EXTEN})

; or hardcoded
exten=>_.,n,Set(CALLERID(rdnis)=123456789)

Enjoy!

Book "LINQ in Action" by Fabrice Marguerie

LINQ, Language INtegrated Query, is a new extension to the Visual Basic and C# programming languages designed to simplify data queries and database interaction. It addreses O/R mapping issues by making query operations like SQL statements part of the programming language. It also offers built-in support for querying in-memory collections like arrays or lists, XML, DataSets, and relational databases. LINQ in Action is a fast-paced, comprehensive tutorial for professional developers. This book explores what can be done with LINQ, shows how it works in an application, and addresses the emerging best practices. It presents the general purpose query facilities offered by LINQ in the upcoming C# 3.0 and VB.NET 9.0 languages. A running example introduces basic LINQ concepts. You'll then learn to query unstructured data using LINQ to XML and relational data with LINQ to SQL. Finally, you'll see how to extend LINQ for custom applications. LINQ in Action will guide you along as you explore this new world of lambda expressions, query operators, and expression trees. As well, you'll explore the new features of C# 3.0, VB.NET 9.0. The book is very practical, anchoring each new idea with running code. Whether you want to use LINQ to query objects, XML documents, or relational databases, you will find all the information you need to get started But LINQ in Action does not stop at the basic code. This book also shows you how LINQ can be used for advanced processing of data, including coverage of LINQ's extensibility, which allows querying more data sources than those supported by default. All code samples are built on a concrete business case. The running example, LinqBooks, is a personal book cataloging system that shows you how to create LINQ applications with Visual Studio 2008 and above.

HOWTO: Repair Logitech M325 Mouse

FixIt says that you will find single screw under CE label. It isn't always true.