Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!
Showing posts with label BZ. Show all posts
Showing posts with label BZ. Show all posts

Saturday, March 16, 2013

Hamachi -Failed to connect to the engine

The LogMeIn Hamachi Tunneling Engine service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion. 


Why do I receive Failed to Connect to Engine?

The error "Failed to connect to engine" is caused by the LogMeIn Hamachi Tunneling Engine either failing to start, being in an error state, or being blocked by anti-virus software.

Engine not running properly

To find the status of the engine:
  1. Press the Windows key and the [R] key on the keyboard.
  2. In the run box type services.msc, and press [Enter].
  3. Look for the LogMeIn Hamachi Tunneling Engine.
If the engine is in any of the following states:
  • Started
  • Starting
  • Stopping
Then try restarting either the service, or the entire computer.
On all OS other than Windows 64 bit, if the service is not running or you receive an error upon start-up, check the following registry location: HKEY_LOCAL_MACHINE\SOFTWARE\LogMeIn Hamachi
On Windows 64 bit, check here: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LogMeIn Hamachi
There should be a String Value (REG_SZ) labeled EngineConfigDir.  If this is not present, create it by right clicking in the blank space and choosing New > String Value.
C:\Documents and Settings\Default User\Local Settings\Application Data\LogMeIn Hamachi
 You may enter any folder location you desire, and it will create the necessary files there for the engine to run.
Important:
Please use care when accessing the Windows Registry.  Consult with your IT support if you are unsure how to proceed.

Blocked by anti-virus

If your anti-virus software is reporting/blocking Hamachi-2-ui.exe, you will need to add an exclusion for the Hamachi-2-ui.exe program.  Please consult your anti-virus software documentation for assistance with adding an exclusion to the allowed list.
 ===========================================
the solution is the following for those that cannot find the service or the service seems to be always on starting

open cmd.exe
write cd\
go to  the hamachi program directory
then cd "C:\Program Files (x86)\LogMeIn Hamachi" to go to hamachi installation directory (change to your own path as necessary)
then write hamachi-2 -u
to uninstall the tunneling engine
then write hamachi-2 -i
to install the tunellingengine

if it dosn't start automatically write
hamachi-2 -s
to start the engine
======================================
http://www.sevenforums.com/general-discussion/274322-services-error-1503-cannot-start-print-spooler-others.html
Fixing this issue is very simple. Here was what I've done to start the Print Spooler:
1. Click Start, type “services.msc” and hit Enter.
2. Scroll down to Print spooler.
3. Right-click Print spooler, then select Properties.
4. Select the Log On tab, and uncheck the Allow service to interact with desktop setting.

(Microsoft recommends that you do not change the Allow service to interact with desktop setting. If you allow the service to interact with the desktop, any information that the service displays on the desktop will also be displayed on an interactive user's desktop. A malicious user could then take control of the service or attack it from the interactive desktop).

5. Once you have uncheck this setting, select the General tab and click "Start" (the Print Spooler should be able to start without popping up the Error 1053 again).
---------------------------------
Upon installing either Hamachi again, or Kaspersky Anti Virus, various services would yield error 1503 again. Uninstalling one or the other (which ever had caused it at time of install) fixed it. So a format ultimately did nothing.
-------------------------------------------------
I had no idea what was causing the issue or even what it really was. I tried everything for the print spooler service, when I instead should have been thinking larger. Whatever was in fact causing it was causing issues with multiple services, notably Print Spooler and Hamchi's Engine Tunneling service. They weren't corrupted, but rather something causing a conflict. Doing the 1 second step I found at MS Answers cured everything having an issue from starting.
===============================

http://www.bleepingcomputer.com/forums/t/441099/infected-with-tempwinupdexe-virus/
http://www.techspot.com/community/topics/search-redirect-and-hijack.170947/
http://www.techmonkeys.co.uk/printthread.php?tid=21154
Run ESET Online Scan
Please do an online scan with ESET Online Scanner. Please use Internet Explorer as it uses ActiveX.
  • Check (tick) this box: YES, I accept the Terms of Use.
  • Click on the Start button next to it.
  • When prompted to run ActiveX. click Yes.
  • You will be asked to install an ActiveX. Click Install.
  • Once installed, the scanner will be initialized.
  • After the scanner is initialized, click Start.
  • Check (tick) Remove found threats box.
  • Check (tick) Scan unwanted applications.
  • Click on Scan.
  • It will start scanning. Please be patient.
  • Once the scan is done, the log will be saved here: C:\Program Files\esetonlinescanner\log.txt.

Friday, December 7, 2012

WiFi -Universal repeater

http://www.tomshardware.com/forum/32245-43-link-repeater-fritz
I have an tp-link wa801nd repeater/router and an AVM FritzFon box connected to our DSL line.  
What does work:
WEP (not WPA) and set the repeater to be a "universal repeater", not just a "repeater".
What did not work:
WPA + set the repeater to be a "repeater" and tell the Fritzbox to allow WDS (wireless distribution). My impression was that the repeater would associate for a little while, then unbind, confuse the clients and a few minutes later bind again.
What would have been OK:
Tell the tp-link to act as an access point and bridge. Let it have its own SSID and run its own DHCP. Clients could associate to this and the tp-link should pass their packets to the Fritz box.
Clients could associate, but their packets did not seem to be gatewayed to the fritz box. I did try setting the gateway on the tp-link to its IP address and to that of the fritz box.
Despite visiting 100 websites, I cannot see the difference between "repeater" and "universal repeater" or at least I cannot find why one would use "repeater".
------------------------------------------
A lot of this is poorly documented by the manufacturers. They’re not even consistent in the use of the terminology, and often leave out meaningful details. Perhaps it’s so complicated they just fear that providing this information would only confuse ppl further.
The difference between Repeater and Universal Repeater is that the former requires WDS (a bridging protocol developed years ago), whereas the latter does not.
The problem w/ WDS is that it’s NOT a wifi certified protocol, so implementations vary across manufacturers. And that means incompatibilities abound. When you use a Universal Repeater, it uses wifi certfied protocols (B/G/N), so it will connect to virtually anything else supporting these same protocols, regardless of manufacturer (that’s why we call them standards!).
Unfortunately most manufacturers don’t get into all the minutia. Instead, they take a short cut and basically tell you to try Repeater (WDS) first, and if that doesn’t work, switch to Universal Repeater. What they’re assuming (hoping) by this strategy is that you’re using ONLY their own wireless devices, and therefore there won’t be any compatibility issues wrt WDS. But should that not be the case, should you be using DIFFERENT manufacturer’s devices, then Universal Repeater should work. But behind the scenes, it’s really all about WDS compatibility, and whether you do or don’t have it.
Now there’s another little catch when it comes to TP-LINK. Most Universal Repeaters require you to specify the SSID, security information, etc., of the AP to which you are bridging. Then you establish another AP (the repeater) and specify its SSID, security information, etc. IOW, it’s entirely possible to have *different* SSIDs, security parameters, etc., on each side of the bridge. Whether that makes sense or is truly necessary is debatable. But most of the time that’s how universal repeater is implemented.
In the case of TP-LINK, at least based upon skimming their manual, I don’t see any means to supply the SSID, security information, etc., of the remote AP. That leads me to believe that in this particular case, TP-LINK requires its own AP and that of the remote AP to be the SAME (otherwise I don’t know how it would know how to connect to the remote AP, I don’t see any means to provide these details independently, or else I missed it).
So that’s the basic situation you find yourself in. If you have devices from the same manufacturer, the likelihood that any WDS-based solution will work is very good. If they are different manufacturers, the likelihood of compatibility is extremely remote. So you must turn to the “universal” solutions they offer (if any) because those are based on accepted standards.
Another “quirk” regarding some universal repeaters is that they sometimes don’t support WPA (not sure why, but I believe it has something to do w/ WPA key rotation), only WEP or WPA2. Frankly, WPA2 is a little better than WPA anyway, so if possible, I would try WPA2 (preferably WPA2/AES, to be precise) and see if that helps.

Fritz!box 7570

avm.de/de/frame/frame.php?product%3DFRITZ!Box+Fon+WLAN+7570+VDSL
FRITZ!Box AddOn für Mozilla Firefox  Version  01.06.03
Holen Sie sich den Schnellzugang zu Ihrer FRITZ!Box, der AVM-Webseite und allerlei nützlichen Einstellungen direkt in Ihre Browser-Leiste.
Download xpi file
-----------------
FRITZ!fax für FRITZ!Box  Version  03.07.04
FRITZ!fax für FRITZ!Box ist ein supportfreies Programm für FRITZ!Boxen mit Telefonie. Es ermöglicht Faxdienste über den Telefonanschluss.
Weitere Informationen zu diesem Update erhalten Sie hier
Download
-------------------
Sie können Ihre FRITZ!Box für VPN-Verbindungen konfigurieren. Dazu benötigen Sie die folgenden Komponenten:
  • die aktuelle Firmware für Ihre FRITZ!Box
  • den VPN-Client FRITZ!Fernzugang
  • den Assistenten "FRITZ!Box Fernzugang einrichten"
Auf dem VPN Service-Portal finden Sie diese Komponenten zum kostenlosen Download. Desweiteren präsentiert das Portal allerhand nützliche Informationen und Hilfestellungen rund um VPN. avm.de/de/Service/Service-Portale/Service-Portal/index.php?portal=VPN

Oft gefragt

Wie viele VPN-Verbindungen können in der FRITZ!Box eingerichtet und gleichzeitig hergestellt werden?
Sie können in der FRITZ!Box bis zu acht VPN-Verbindungen (Virtual Private Network) zu anderen Netzwerken oder Benutzern einrichten. Wie viele dieser VPN-Verbindungen gleichzeitig nutzbar sind, hängt lediglich von der Bandbreite und Auslastung der Internetverbindung ab.
Wichtig:
Beim Einrichten von mehr als acht VPN-Verbindungen kann es zu Anzeigeproblemen in der Benutzeroberfläche und zu Stabilitätsproblemen kommen. AVM supportet nur FRITZ!Box-Geräte, in denen maximal acht VPN-Verbindungen eingerichtet sind.
===========================
1) Connecting the fritz!box (the first time) to your computer:
see http://www.avm.de/en/service/manuals..._WLAN_7170.pdf
page 17 (best just use a network cable/LAN cable like the red one that comes with the box to connect to LAN 1 or ....)
- do wireless setup later
2) The setup page of your fritzbox will probably be on
http://fritz.box or
192.168.178.1 (as I recall in default without any password).
3) If you need to setup anything in your openSUSE system you will need the openSUSE passwords - but probably you do not need to setup anything at first.
4) For a wireless access to your fritz!box and so to the internet without a cable you will need the wireless passsword - which is the one on the bottom of the box by default and can be changed by you *in* the fritzbox-settings (see 2).
For doing this it is best not to use the YaST but the userspace programs networkmanager and the according GNOME/KDE programs that you will find in the panel (in GNOME 3 it looks now a bit like a loudspeaker symbol - ca. an 1/8 of four concentric circles and a point). Maybe you will also need a password for your Keyring (probably you could chose one or it is your user's login keyword...)
--------------
about 4)
Maybe needed especially if you have anything changed in the network settings in YaST:
open YaST (root password needed) > Network Devices / Network Settings: Tab: "Global" tab - select=[x] "User Controlled with NetworkManager" to reactivate the NetworkManager and the connected GNOME/KDE program.
============
============
http://www.avm.de/help/Sets/avme/es/008/hilfe_internet_dslsnrset.html 
Configuración del Anexo
Seleccione el tipo de anexo que utiliza su conexión ADSL. La siguiente tabla le ayudará a realizar correctamente la selección. No se garantiza que no haya errores en los datos que se encuentran en la tabla.
Nota: Si selecciona incorrectamente el tipo de anexo pueden presentarse disturbios en el funcionamiento del servicio de telefonía. En algunos casos no se podrá hacer una sincronización ADSL.
==================
You tried to visit fritz.box, which is not loading.
 permalink
208.67.222.222
208.67.220.220
These addresses are configured on your router, or on your computer. Remove them.
https://store.opendns.com/setup/ Basic instructions. Use these to remove, rather than place, the OpenDNS addresses.
Or, create an account here to control your own filtering.
Otherwise, your ISP or whomever controls your network (if it is not yours) is responsible.
forums.opendns.com/search.php?Search&Keywords=FRITZ
 ==================
 http://forums.opendns.com/comments.php?DiscussionID=7267
ABE of  NOscript !!!

Fritz!Box 7390 working as a VDSL modem

forums.thinkbroadband.com/how-to-get-a-fritzbox-7390-workingI have finally had a chance to try getting my AVM Fritz!Box 7390 working as a VDSL Modem instead of the Openreach modem. It had been working fine as a router, but obviously I wanted to use the built-in modem as well, due to the pretty impressive statistics the box offers.
In short, I was successful! As reported previously, the modem synchronizes fine by default, but the PPPoE connection fails to establish - as willuk2010 helpfully found out, this is generally due to third-party modems not being set to the correct VLAN ID, which is 101 on Openreach. I can also confirm that this seem to be the same VLAN ID across the board, as I am on Aquiss - I was concerned that my VLAN ID might be different, but that does not seem to be the case (unline e.g. in Germany where Vodafone seems to be on a different VLAN than Telekom).
Here are the instructions:
a) Export your Fritz!Box configuration, just in case.
b) Download FBEditor 0.5.2 from http://www.ip-phone-forum.de/showthread.php?t=79513&... - you might have to register. This can be used to edit the configuration files. Theoretically, you can enable telnet access on the Fritz!Box by dialing #96*7* on an attached DECT phone, and then edit the configuration file directly using vi, but FBEditor is probably safer in case you mess up your stanzas.
c) When first opened, FBEditor will ask you for the IP address to your fritz.box and the web password. Once entered and connected, you can use the menu option "Datei" -> "Konfiguration einlesen" or just press CTRL-E to read in the configuration.
d) Find and change the following:
ar7cfg {
...
tcom_targetarch = yes;
vdsl_resalearch = yes;
...
}

dslifaces {
...
pppoevlanauto = yes;
pppoevlanauto_startwithvlan = yes;
...
}

dslglobalconfig {
...
default_tcom_vlan = 101;
...
}
e) Use "Datei" -> "Konfiguration zur�ckspielen". This uploads the modified configuration to the Fritz!Box, which will then restart.
If you have been using the Openreach modem, it is probably best to remove it from LAN Port one and change the configuration back so that the Fritz!Box tries to use the internal modem. Make sure you connect the Y cable to the NTE instead of having the Openreach modem connected.
Once rebooted, the Fritz!Box will synchronize again, and the PPPoE connection should be established automatically.
My stats (do I see potential for 15 MBit/s upstream in there?)
Send Receive
DSLAM-Data rate Max. kBit/s 40000 9984
DSLAM-Data rate Min. kBit/s 128 128
Capacity kBit/s 41136 16325
Current Data rate kBit/s 39984 9984
Latency 0 ms 0 ms
Carrier swap (Bitswap) on on
Impulse protection 0.0 0.0
SNR dB 7 16
Atennuation dB 7 -
Carriers A43 A43
Profile 17a

Tuesday, December 4, 2012

OpenVPN configuración client-server

http://openvpn.net/index.php/download/access-server-downloads.html
OpenVPN Access Server is a full featured SSL VPN software solution that integrates OpenVPN server capabilities, enterprise management capabilities, simplified OpenVPN Connect UI, and OpenVPN Client software packages that accommodate Windows, MAC, and Linux OS environments. OpenVPN Access Server supports a wide range of configurations, including secure and granular remote access to internal network and/ or private cloud network resources and applications with fine-grained access control. 
http://openvpn.net/index.php/download/community-downloads.html
 =============================
 http://openvpn.net/index.php/access-server/download-openvpn-as-vm/202.html?osfamily=Virtual%20Appliance%20Windows%20%28VHD%29&ex=1
Using the OpenVPN Access Server Windows (VHD) Virtualization Version [It uses Ubuntu]
Virtual Appliance Windows (VHD) Version of OpenVPN Access Server to Begin Downloading

Using the OpenVPN Access Server Virtual Appliance For Windows (VHD) Virtualization Version
Release with Access Server v1.8.4

Initial Setup of Access Server
The first time the virtual appliance boots, you will be queried for some information. First, you must agree to the End User License Agreement (EULA). Next, you will be asked to enter some basic settings that the OpenVPN Access Server needs to initialize itself. These settings may be safely defaulted by pressing 'Enter'.
At the end of the boot sequence, the appliance window will turn to a blue background and show the URL of the appliance management interface. Enter this URL into a browser to continue the setup. You will likely receive a browser warning about the web server SSL certificate not being recognized. You can safely ignore these warnings.
On the appliance management interface, enter the username and password for the appliance. The initial credentials are:
Username: root
Password: openvpnas
See the Virtual Appliance section of the FAQ for information on how to change the root password.
The Admin Account for OpenVPN-AS needs to be setup through terminal by doing the following:
Change the password:
passwd openvpn
You will then be prompted to set a password for the user openvpn, after setting the password you can login to the Admin UI with the Username openvpn and the password you set.
Once logged in, you will be directed to the "System Information" page which gives you basic control over the virtual appliance. You can reboot, shut down, or change the network settings of the appliance.
Note:Keep in mind that the appliance will acquire its own IP address from DHCP that is separate from the IP address of the VMware host machine. You can use this DHCP-assigned address, or enter a fixed IP address under the "Network" tab.
The next step is to log into the OpenVPN Access Server Admin Web UI. On the "System Information" page, click on the "AS Admin Login" link located in the upper right corner of the page. You will receive another certificate-related browser warning at this point; that warning can also be ignored. At the Access Server Admin Web UI login page, enter the same username and password you entered previously for the appliance management interface.
Once logged in to the Access Server Admin Web UI, follow the instructions in the "Welcome to the Access Server Admin UI" information box to complete configuration of the Access Server.

=============================
OpenVPN: Manual para GNU/Linux y Windows 7 32bits y 64bits. Cliente/Servidor. SSL/TLS
OpenVPN es un cliente/servidor VPN tanto para equipos GNU/Linux como para Windows.
¿Para qué sirve hacer esto?
Para conectarnos a internet de una manera segura desde cualquier red ya sea cableada o WiFi, con cifrado WEP/WPA o sin cifrar. Todo el tráfico irá cifrado a través de un Túnel desde el AP que nos conectamos hasta nuestra casa y desde allí saldrá a internet, es como estar en nuestra casa. Lo malo es que debes tener una buena velocidad de subida, ya que de eso dependerá en mayor medida tu velocidad de bajada (a no ser que la red donde te conectes tenga menos bajada que la velocidad de subida de tu conexión).
También sirve en caso de no redigirir el tráfico, para poder acceder a los recursos compartidos de nuestra casa como puede ser imprimir desde la Universidad, copiarnos archivos desde el disco duro compartido de casa etc.
La VPN será SSL/TLS, y podemos encontrar dos tipos, TUN y TAP.
TUN: El controlador TUN emula un dispositivo punto a punto, es utilizado para crear túneles virtuales operando con el protocolo IP. De esta forma se puede encapsular todos los paquetes que se transporten a través de él como datagramas TCP o UDP (más adelante veréis que escogemos UDP en lugar de TCP, y preguntaréis que por qué ya que TCP es conectivo, fiable y Orientado a conexión). Las máquinas que queden detrás de cada uno de los extremos del enlace pertenecerán a subredes diferentes.
TAP: Simula una interfaz de red Ethernet, más comúnmente conocido como modo puente o bridge, estos túneles virtuales encapsulan directamente paquetes ethernet. Esta situación permite empaquetar entramados diferentes al IP. Las máquinas situadas detrás de cada uno de los extremos del enlace pueden operar como parte de la misma subred (si se utiliza el protocolo IP). El modo de funcionamiento puente es particularmente útil para enlazar usuarios remotos, ya que éstos pueden conectarse a un mismo servidor y virtualmente formar parte de la red principal.
En el manual usaremos TUN.
En este manual os voy a explicar cómo hacerlo en GNU/Linux, aunque en esencia, es lo mismo para Windows, únicamente cambian los comandos en la consola (cmd.exe), los certificados y las llaves, son los mismos para los dos, es decir, puedes crear TODO en GNU/Linux y luego pasarlo a Windows para usarlo (ya sea cliente o servidor), únicamente deberás cambiar la extensión del cliente/servidor .conf por .ovpn
Voy a explicaros como realizar la configuración más segura posible.
- Usaremos una llave RSA para crear CA.key de 2048bits sin afectar lo más mínimo al rendimiento de la VPN.
- La llave simétrica será AES-256bits-CBC (Encadenamiento de Cifrado en Bloque) uno de los más seguros (OpenVPN incluye todo esto, no hay que “programarlo” ni nada parecido).
- Incluiremos TLS/AUTH una firma HMAC adicional para todos las negociaciones SSL/TLS para la verificación de la integridad. Cualquier paquete UDP que no posea la firma HMAC correcta es bloqueado. La firma HMAC TLS-AUTH provee un nivel de seguridad adicional mas allá del que provee SSL/TLS, de esta forma nos protegemos de ataques DoS, escaneo de puertos y le ahorramos trabajo al servidor (porque si esto falla al intentar la autenticación lo corta y no lo sigue intentando).
- Protocolo UDP en lugar de TCP porque es más fuerte frente a ataques DoS y escaneos de puertos (UDP es no conectivo, no fiable, no orientado a conexión).

GNU/Linux Ubuntu

OpenVPN Logo
Instalamos Openvpn con el siguiente comando desde los repositorios:
sudo apt-get install openvpn
Ahora vamos a copiar los archivos easy-rsa y sample-config-files a /etc/openvpn/ (previamente hemos ido al directorio con la orden cd).
ubuntu@ubuntu:/usr/share/doc/openvpn/examples$ ls
easy-rsa sample-config-files sample-keys sample-scripts
Copiamos easy-rsa y sample-config-files a /etc/openvpn/
ubuntu@ubuntu:/usr/share/doc/openvpn/examples$ sudo cp -R easy-rsa/ /etc/openvpn/
ubuntu@ubuntu:/usr/share/doc/openvpn/examples$ sudo cp -R sample-config-files/ /etc/openvpn/
Ahora nos metemos en el directorio de trabajo y veremos muchos ficheros:
ubuntu@ubuntu:/etc/openvpn/easy-rsa/2.0$ ls
build-ca build-key-server Makefile sign-req
build-dh build-req openssl-0.9.6.cnf.gz vars
build-inter build-req-pass openssl.cnf whichopensslcnf
build-key clean-all pkitool
build-key-pass inherit-inter README.gz
build-key-pkcs12 list-crl revoke-full
Ejecutamos el siguiente comando para crear una carpeta en este directorio donde almacenaremos las claves:
mkdir keys
Es en este directorio donde se almacenaran las llaves privadas (.key), los archivos de requerimiento de certificado (.csr) y los certificados (.crt) y otros archivos.
- Las llaves .key son PRIVADAS, han de ser copiadas por un medio seguro.
- Los certificados .crt y el requerimiento .csr puede pasarse sobre un medio inseguro (emails, messenger).

Generar la llave y el certificado para la Autoridad Certificadora (CA).

En esta parte vamos a crear los certificados y las llaves para la CA, para el servidor y para el cliente, nos logueamos en la consola como root (siempre como root para dejarnos de líos).
Ahora vamos a editar el archivo “vars”.
Nos situamos en el directorio de trabajo:
cd /etc/openvpn/easy-rsa/2.0/
gedit vars
- Ahora modificamos KEY_COUNTRY, KEY_PROVINCE, KEY_CITY, KEY_ORG y KEY_MAIL a vuestro gusto, pero no podéis dejarlo en blanco.
- También modificamos la ruta donde están las KEYS, ya que luego haremos un ./clean-all y si no está la ruta correcta, dará error.
- El tamaño de la llave RSA es controlado por la variable KEY_SIZE en el archivo vars, por tanto en lugar de tener 1024 (bits), ponemos 2048 (bits) si queréis más seguridad (recomiendo 2048).
Una vez lo hayáis modificado, guardamos y salimos, os debería quedar algo así:
# easy-rsa parameter settings
# NOTE: If you installed from an RPM,
# don’t edit this file in place in
# /usr/share/openvpn/easy-rsa –
# instead, you should copy the whole
# easy-rsa directory to another location
# (such as /etc/openvpn) so that your
# edits will not be wiped out by a future
# OpenVPN package upgrade.

# This variable should point to
# the top level of the easy-rsa
# tree.
export EASY_RSA=”`pwd`”

#
# This variable should point to
# the requested executables
#
export OPENSSL=”openssl”
export PKCS11TOOL=”pkcs11-tool”
export GREP=”grep”

# This variable should point to
# the openssl.cnf file included
# with easy-rsa.
export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA’

# Edit this variable to point to
# your soon-to-be-created key
# directory.
#
# WARNING: clean-all will do
# a rm -rf on this directory
# so make sure you define
# it correctly!
export KEY_DIR=”/etc/openvpn/easy-rsa/2.0/keys/”

# Issue rm -rf warning
echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR

# PKCS11 fixes
export PKCS11_MODULE_PATH=”dummy”
export PKCS11_PIN=”dummy”

# Increase this to 2048 if you
# are paranoid. This will slow
# down TLS negotiation performance
# as well as the one-time DH parms
# generation process.
export KEY_SIZE=2048

# In how many days should the root CA key expire?
export CA_EXPIRE=3650

# In how many days should certificates expire?
export KEY_EXPIRE=3650

# These are the default values for fields
# which will be placed in the certificate.
# Don’t leave any of these fields blank.
export KEY_COUNTRY=”XXXX”
export KEY_PROVINCE=”XXX”
export KEY_CITY=”XXXX”
export KEY_ORG=”XXXXX”
export KEY_EMAIL=”XXXXX@XXX.com”
En el mismo directorio tecleamos lo siguiente para limpiar todos los archivos que haya en /keys/.
source ./vars
./clean-all

Parámetros Diffie Hellman

Vamos a generar estos parámetros necesarios para el servidor.
En consola y en el mismo directorio de siempre (/etc/openvpn/easy-rsa/2.0/)
./build-dh (recuerda ejecutarlo como root)
Os saldrá algo parecido a esto:
root@Portatil:/etc/openvpn/easy-rsa/2.0# ./build-dh
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
……………………………….+……………….++*++*
……………………………….+……………….++*++*
root@Portatil:/etc/openvpn/easy-rsa/2.0#
Nota: los guiones anteriores eran simples guiones, estos que vienen a continuación y que por ejemplo están antes que initca son dos guiones juntos, parece que es uno largo pero no.

Creación certificado para la CA

Ahora creamos el certificado para la CA:
./pkitool –initca
Os saldrá algo como esto:
root@Portatil:/etc/openvpn/easy-rsa/2.0# ./pkitool –initca
Using CA Common Name: vpn CA
Generating a 2048 bit RSA private key
…….+++
………….+++
writing new private key to ‘ca.key’
—–
root@Portatil:/etc/openvpn/easy-rsa/2.0#

Generación de certificado y llaves para el SERVER

./pkitool –server servidor
Nos saldrá algo así:
root@Portatil:/etc/openvpn/easy-rsa/2.0# ./pkitool –server servidor
Generating a 2048 bit RSA private key
…………………………+++
…………………………………..+++
writing new private key to ‘servidor.key’
—–
Using configuration from /etc/openvpn/easy-rsa/2.0/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject’s Distinguished Name is as follows
countryName PRINTABLE:’XX’
stateOrProvinceName PRINTABLE:’XXX’
localityName PRINTABLE:’XXX’
organizationName PRINTABLE:’XXXX’
commonName PRINTABLE:’servidor’
emailAddress :IA5STRING:”XXXXXX”
Certificate is to be certified until Jun 19 09:40:27 2020 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated
root@Portatil:/etc/openvpn/easy-rsa/2.0#
Todos los valores los obtiene del archivo VARS, y el Common Name lo obtiene de “servidor” que está a continuación de “–server”.

Generación de certificado y llaves para el CLIENTE

./pkitool cliente1
Nos saldrá algo así:
root@Portatil:/etc/openvpn/easy-rsa/2.0# ./pkitool cliente1
Generating a 2048 bit RSA private key
………………………….+++
………………………………………….+++
writing new private key to ‘cliente1.key’
—–
Using configuration from /etc/openvpn/easy-rsa/2.0/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject’s Distinguished Name is as follows
countryName PRINTABLE:’XX’
stateOrProvinceName PRINTABLE:’XXX’
localityName PRINTABLE:’XXX’
organizationName PRINTABLE:’XXX’
commonName PRINTABLE:’cliente1′
emailAddress :IA5STRING:’XXXX’
Certificate is to be certified until Jun 19 09:41:34 2020 GMT (3650 days)
Write out database with 1 new entries
Data Base Updated
root@Portatil:/etc/openvpn/easy-rsa/2.0#
Para generar más clientes hacemos lo siguiente:
source ./vars
./pkitool cliente2
Si queremos el tercero hacemos:
source ./vars
./pkitool cliente3
Antes de crear cada certificado debemos ejecutar source ./vars (por si queréis más).
Ahora nos vamos a:
cd /etc/openvpn/easy-rsa/2.0/keys/
Y veremos todas las claves (comando ls para verlas).

Generar llave TLS-AUTH

openvpn –genkey –secret ta.key (donde ta.key es la llave que deberemos usar tanto en el servidor como en el cliente).
En la configuración del servidor (servidor.conf o servidor.ovpn) deberemos poner:
tls-auth ta.key 0 (0 de Incoming)
En la configuración del cliente (cliente.conf o cliente.ovpn) deberemos poner:
tls-auth ta.key 1 (1 de Outgoing)
A continuación os pongo una tabla de qué es cada cosa.
Tabla VPN
Podemos agruparlos por carpetas para mayor comodidad siguiendo la tabla ya que por ejemplo ca.crt tiene que estar en todos los clientes/servidores (servidor, cliente1, cliente2, etc).

Archivo de Configuración del Cliente (client.conf)

Viene una pequeña guía de para qué sirve cada comando, tenéis que modificar:
- remote my-server-1 1194 ya que aquí deberemos poner el host dyndns que tengáis, Host en DynDNS para servidores domésticos como FTP, VPN, servidor de juegos o servidor WEB : Manual DynDNS
- ca ca.crt cert client.crt y key client.key lo debéis cambiar por el nombre que le habéis puesto a cliente, en este caso cliente1, cliente2 y con la RUTA COMPLETA al archivo para evitarnos problemas, quedaría así:
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/cliente1.crt
key /etc/openvpn/easy-rsa/2.0/keys/cliente1.key
-En el siguiente fragmento veis el TLS-AUTH que usaremos, quitamos e punto y coma (;) y lo activaremos, el ta.key también ponemos la ruta completa de la ta.key.
# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth ta.key 1
- Como hemos elegido un cifrado AES-256-CBC pues lo ponemos:
# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
cipher AES-256-CBC
Y ya tenemos el cliente listo.
La ruta completa de cada archivo (ca.crt cliente1.key etc, no hace falta ponerla siempre y cuando el client.conf esté en la misma carpeta que ellas, pero para no tener problemas pues ponemos la ruta completa).

Archivo de Configuración del Servidor (server.conf)

- En el servidor debemos poner la IP interna que tendremos en la red para escuchar, el puerto, si es el de por defecto no habrá que tocarlo.
- Ponemos las rutas completas de los siguientes archivos:

ca ca.crt
cert server.crt
key server.key
- dh dh2048.pem ya que lo hemos puesto de 2048 bits.
- El rango del servidor no hace falta tocarlo, el cifrado que hemos elegido y la TLS-AUTH.

Aquí no he explicado con detalle la configuración del servidor, porque poca gente va a tener un ordenador con GNU/Linux o Windows encendido dedicado únicamente a esto, es mucho más cómodo un router con firmwares de terceros como Tomato y el correspondiente módulo OpenVPN donde es todo gráfico, a continuación os pongo unas capturas de pantalla para que lo veáis junto con el LOG del router al arrancar la VPN.
Nota: las claves se meten en las casillas haciendo un gedit ca.crt (por ejemplo), copiamos y pegamos todo lo que aparece en el gedit y listo! (sí, todos esos símbolos y letras).
Click en la foto para ampliarla y verla mejor.
Tomato VPN
Tomato VPN
Tomato VPN

Pruebas de conectividad:

Log de inicio de OpenVPN en el router:
Jun 21 18:14:39 router daemon.notice openvpn[344]: OpenVPN 2.1.1 mipsel-unknown-linux-gnu [SSL] [LZO2] built on Feb 17 2010
Jun 21 18:14:39 router daemon.warn openvpn[344]: NOTE: OpenVPN 2.1 requires ‘–script-security 2′ or higher to call user-defined scripts or executables
Jun 21 18:14:42 router daemon.notice openvpn[344]: Diffie-Hellman initialized with 2048 bit key
Jun 21 18:14:42 router daemon.notice openvpn[344]: Control Channel Authentication: using ‘static.key’ as a OpenVPN static key file
Jun 21 18:14:42 router daemon.notice openvpn[344]: Outgoing Control Channel Authentication: Using 160 bit message hash ‘SHA1′ for HMAC authentication
Jun 21 18:14:42 router daemon.notice openvpn[344]: Incoming Control Channel Authentication: Using 160 bit message hash ‘SHA1′ for HMAC authentication
Jun 21 18:14:42 router daemon.notice openvpn[344]: TLS-Auth MTU parms [ L:1558 D:166 EF:66 EB:0 ET:0 EL:0 ]
Jun 21 18:14:42 router daemon.notice openvpn[344]: TUN/TAP device tun21 opened
Jun 21 18:14:42 router daemon.notice openvpn[344]: TUN/TAP TX queue length set to 100
Jun 21 18:14:42 router daemon.notice openvpn[344]: /sbin/ifconfig tun21 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Jun 21 18:14:42 router daemon.notice openvpn[344]: /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Jun 21 18:14:42 router daemon.notice openvpn[344]: Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:135 ET:0 EL:0 AF:3/1 ]
Jun 21 18:14:42 router daemon.notice openvpn[407]: Socket Buffers: R=[108544->131072] S=[108544->131072]
Jun 21 18:14:42 router daemon.notice openvpn[407]: UDPv4 link local (bound): [undef]:1194
Jun 21 18:14:42 router daemon.notice openvpn[407]: UDPv4 link remote: [undef]
Jun 21 18:14:42 router daemon.notice openvpn[407]: MULTI: multi_init called, r=256 v=256
Jun 21 18:14:42 router daemon.notice openvpn[407]: IFCONFIG POOL: base=10.8.0.4 size=62
Jun 21 18:14:42 router daemon.notice openvpn[407]: Initialization Sequence Completed
Cliente:
root@Portatil:/etc/openvpn# openvpn client.conf
Tue Jun 22 12:08:24 2010 OpenVPN 2.1.0 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jan 26 2010
Tue Jun 22 12:08:24 2010 NOTE: OpenVPN 2.1 requires ‘–script-security 2′ or higher to call user-defined scripts or executables
Tue Jun 22 12:08:24 2010 /usr/bin/openssl-vulnkey -q -b 2048 -m
Tue Jun 22 12:08:24 2010 Control Channel Authentication: using ‘ta.key’ as a OpenVPN static key file
Tue Jun 22 12:08:24 2010 Outgoing Control Channel Authentication: Using 160 bit message hash ‘SHA1′ for HMAC authentication
Tue Jun 22 12:08:24 2010 Incoming Control Channel Authentication: Using 160 bit message hash ‘SHA1′ for HMAC authentication
Tue Jun 22 12:08:24 2010 LZO compression initialized
Tue Jun 22 12:08:24 2010 Control Channel MTU parms [ L:1558 D:166 EF:66 EB:0 ET:0 EL:0 ]
Tue Jun 22 12:08:24 2010 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Jun 22 12:08:24 2010 Local Options hash (VER=V4): ’9e7066d2′
Tue Jun 22 12:08:24 2010 Expected Remote Options hash (VER=V4): ’162b04de’
Tue Jun 22 12:08:24 2010 Socket Buffers: R=[124928->131072] S=[124928->131072]
Tue Jun 22 12:08:24 2010 UDPv4 link local: [undef]
Tue Jun 22 12:08:24 2010 UDPv4 link remote: [AF_INET]XX:1194
Tue Jun 22 12:08:24 2010 TLS: Initial packet from [AF_INET]XX:1194, sid=0e6c8016 fc84b328
Tue Jun 22 12:08:27 2010 VERIFY OK: depth=1, /C=XX/ST=X/L=XX/O=Xa/CN=XX/emailAddress=XX.com
Tue Jun 22 12:08:27 2010 VERIFY OK: nsCertType=SERVER
Tue Jun 22 12:08:27 2010 VERIFY OK: depth=0, /C=XXX/ST=XX/L=xxx/O=xxxx/CN=xxx/emailAddress=xxx
Tue Jun 22 12:08:30 2010 Data Channel Encrypt: Cipher ‘AES-256-CBC’ initialized with 256 bit key
Tue Jun 22 12:08:30 2010 Data Channel Encrypt: Using 160 bit message hash ‘SHA1′ for HMAC authentication
Tue Jun 22 12:08:30 2010 Data Channel Decrypt: Cipher ‘AES-256-CBC’ initialized with 256 bit key
Tue Jun 22 12:08:30 2010 Data Channel Decrypt: Using 160 bit message hash ‘SHA1′ for HMAC authentication
Tue Jun 22 12:08:30 2010 Control Channel: TLSv1, cipher TLSv1/SSLv3 EDH-RSA-DES-CBC3-SHA, 2048 bit RSA
Tue Jun 22 12:08:30 2010 [servidor] Peer Connection Initiated with [AF_INET]87.220.30.11:1194
Tue Jun 22 12:08:33 2010 SENT CONTROL [servidor]: ‘PUSH_REQUEST’ (status=1)
Tue Jun 22 12:08:33 2010 PUSH: Received control message: ‘PUSH_REPLY,route 10.10.3.0 255.255.255.0,dhcp-option DOMAIN RED_LOCAL,dhcp-option DNS 10.10.3.1,redirect-gateway def1,route 10.8.0.1,topology net30,ping 15,ping-restart 60,ifconfig 10.8.0.6 10.8.0.5′
Tue Jun 22 12:08:33 2010 OPTIONS IMPORT: timers and/or timeouts modified
Tue Jun 22 12:08:33 2010 OPTIONS IMPORT: –ifconfig/up options modified
Tue Jun 22 12:08:33 2010 OPTIONS IMPORT: route options modified
Tue Jun 22 12:08:33 2010 OPTIONS IMPORT: –ip-win32 and/or –dhcp-option options modified
Tue Jun 22 12:08:33 2010 ROUTE default_gateway=10.10.2.1
Tue Jun 22 12:08:33 2010 TUN/TAP device tun0 opened
Tue Jun 22 12:08:33 2010 TUN/TAP TX queue length set to 100
Tue Jun 22 12:08:33 2010 /sbin/ifconfig tun0 10.8.0.6 pointopoint 10.8.0.5 mtu 1500
Tue Jun 22 12:08:33 2010 /sbin/route add -net xxx netmask 255.255.255.255 gw 10.10.2.1
Tue Jun 22 12:08:33 2010 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.8.0.5
Tue Jun 22 12:08:33 2010 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.8.0.5
Tue Jun 22 12:08:33 2010 /sbin/route add -net 10.10.3.0 netmask 255.255.255.0 gw 10.8.0.5
Tue Jun 22 12:08:33 2010 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.5
Tue Jun 22 12:08:33 2010 Initialization Sequence Completed
Ahora tenemos tres opciones para conectaros a la VPN:
- Tecleando en consola el comando “sudo openvpn cliente.conf” y no cerrando la consola (ya que si no cierra la conexión).
- Automatizando el inicio de la VPN en el sistema, con lo cual siempre pasarás por la VPN aunque la red sea segura, y eso conlleva no tener la máxima velocidad posible (redirigimos internet).
- Poniendo OpenVPN en el network manager de forma gráfica y ada vez que queramos conectarnos dar 2 clicks y listo.
Esta última forma es la más útil al menos para mí, os voy a poner como hacerlo.

Usar Network-Manager para hacer la conexión OpenVPN (con gráficos y sin consola).

Vamos a instalar OpenVPN para el network-manager (plugin).
sudo apt-get install network-manager-openvpn
SOLUCIÓN a: Openvpn falló porque no había secretos vpn válidos
Una vez instalado (y reiniciado el sistema a ser posible) hacemos:
sudo gedit /etc/dbus-1/system.d/nm-openvpn-service.conf
Y debe poner obligatoriamente lo siguiente:
“-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN”
“http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd”>













Guardáis datos, salís del gedit y reiniciáis el ordenador (también vale reiniciar sólo el network-manager pero tardas menos así), ya nos os dará el famoso error de: Openvpn falló porque no había secretos vpn válidos.
Nota:
Realmente lo único que haces es intercalar esta línea de código:



Entre las otras dos, pero os puse el código entero para que no os compliquéis la vida.
Ya tenemos el plugin openvpn para network manager puesto a punto para configurarlo, ahora vamos a importar la configuración cliente.conf de tal forma que en 4 clicks tengamos todo listo.
En esta pantalla seleccionamos “Importar“:
Network Manager OpenVPN
Buscamos el archivos .CONF y doble click:
Network Manager OpenVPN
A continuación y SIN TOCAR NADA, le damos a APLICAR:
Network Manager OpenVPN
Y ya la habremos importado:
Network Manager OpenVPN
Una vez que hemos hecho esto, basta con dar click izquierdo sobre el network-manager, nos vamos a conexiones VPN y seleccionamos la conexión que hemos importado anteriormente, en 15 segundos estaremos conectados y nos podrá un candado sobre el network-manager, si no funciona ejecutad el cliente.conf manualmente con el siguiente comando (si tampoco conecta, repasa los archivos .CONF).
sudo openvpn cliente.conf
Nota: aquí tenéis el HOWTO oficial de OpenVPN:
http://openvpn.net/index.php/open-source/documentation/howto.html
 
Windows 7
La creación de los certificados es exactamente en Windows que en GNU/Linux, sólo cambian los comandos a usar, incluso podéis hacer los certificados en GNU/Linux y llevarlos a Windows sin cambiar de extensión, únicamente el server.conf y cliente.conf han de pasar a extensión .ovpn, nada más.
Lo primero que vamos a hacer es bajarnos la última versión de OpenVPN y configurar el GUI adecuadamente.
Descargamos la última versión OpenVPN desde aquí:
http://openvpn.net/index.php/open-source/downloads.html
La instalamos normalmente, con derechos de administrador (por supuesto), una vez instalado todo, reiniciamos el equipo (aunque no es necesario).
Ahora nos vamos al icono del escritorio y pulsamos click derecho sobre él y seleccionamos PROPIEDADES, en la pestaña COMPATIBILIDADModo de Compatibilidad para Windows XP (Service Pack 3) Ejecutar como administrador“, tal y como tenéis en la imagen: seleccionamos y seleccionamos la casilla de ”
OpenVPN Windows7
Y ya os debería funcionar correctamente, si os funciona sin hacer esto pues perfecto, pero a mí no me funcionó.

Generar la llave y el certificado para la Autoridad Certificadora (CA).

Ejecutamos el CMD.EXE con permisos de administrador (clic derecho ejecutar como administrador).
Nos vamos al directorio de trabajo de OpenVPN carpeta easy-rsa con el comando cd.
- Renombramos vars.bat.sample a vars.bat y lo abrimos con el bloc de notas para rellenar las key_country, key_province etc.
- El tamaño de la llave RSA es controlado por la variable KEY_SIZE en el archivo vars, por tanto en lugar de tener 1024 (bits), ponemos 2048 (bits) si queréis más seguridad (recomiendo 2048).
Salimos y guardamos.
Ejecutamos el comando vars (en c:\archivos de programa\openvpn\easy-rsa)
A continuación ejecutamos clean-all.bat, nos creará una carpeta nueva “keys” donde almacenaremos las claves.

Parámetros Diffie Hellman

Vamos a generar estos parámetros necesarios para el servidor.
Ejecutamos el comando: build-dh y empezará el proceso.

Creación certificado para la CA

Renombramos openssl.sample a openssl (sin el sample).
Ejecutamos en consola build-ca para crearlo y ponéis lo mismo que habéis rellenado en vars (key_country etc) y cuando te pida common name poned openvpn-ca (por ejemplo).

Generación de certificado y llaves para el SERVER

Ejecutamos: build-key-server server para crear el servidor, el common name se obtiene del segundo “server”.

Generación de certificado y llaves para el CLIENTE

Ejecutamos: build-key cliente1 para crear el primer cliente y así con los demás que queramos.

Generar llave TLS-AUTH

En el directorio easy-rsa ejecutamos: openvpn –genkey –secret ta.key y se nos pondrá en ese mismo directorio.
Nota: son dos guiones, no uno sólo.
Ahora nos toca configurar el client.ovpn (client.conf en GNU/Linux) con esto, se hace exactamente igual que en GNU/Linux y tiene las mismas opciones y TODO IGUAL.
El servidor es también igual que en GNU/Linux.
Los archivos que debéis pasar al servidor y clientes, hacedlo por un medio seguro con las .key.
Aquí tenéis la misma tabla que puse arriba:
Tabla VPN
Aquí tenéis el manual oficial de OpenVPN:
http://openvpn.net/index.php/open-source/documentation/howto.html

Pruebas de conectividad e iniciación:

Como supongo que usaréis Windows como cliente para conectaros a una VPN que esté en un servidor con GNU/Linux o en un router con firmwares de terceros, os voy a enseñar como arrancarlo mediante la interfaz gráfica.
Copiamos ca.crt, cliente1.crt, cliente1.key, ta.key y cliente.ovpn a la carpeta Openvpn/config/, en el cliente.ovpn no hace falta poner la ruta entera de ca.crt y todos los demás, ya que están en la misma carpeta.
Una vez que ya tenemos el servidor a punto, todos los archivos del cliente en la carpeta config, iniciamos el OpenVPN GUI que tenemos en el escritorio.
Recuerda: ejecuta en modo de compatibilidad XP Service Pack 3 y con derechos de administrador.
Clic derecho sobre el icono y pulsamos connect, esperamos hasta que se conecte y nos de LUZ VERDE (si hacemos click derecho sobre el icono y le damos a “Show Status” nos mostrará el LOG de conexión).
Windows Cliente VPN
Y ya estamos conectados a la VPN en Windows 7.
Espero que os haya gustado…y si tenéis alguna pregunta hacedla y os responderé (si sé).
Manual realizado por Sergio de Luz (Bron) para REDESZone.net

Wednesday, November 7, 2012

Two Routers with DD-WRT

Dual Gateway / Router setup with DD-WRT
In this post we'll look at setting up a dual router 1GB/s home network using the TL-WR1043ND routers, both with DD-WRT software.  DD-WRT is one of the documented projects and it goes a long way in making the product very stable and easy to work with. The routers are also capable of Wireless N connections however in this case we were also aiming for high stability, speed and to avoid the fluctuations in speeds braught on about by the N and G wireless connections.  This also to allow streaming / watching movies without having to copy them from system to system to avoid choppy video / sound and also to accommodate the needs of our HTPC+B solution through file sharing.
QUICK STEPS
The steps here assume you have earlier reimaged the router using instructions on the DD-WRT site and are generally relatively comfortable navigating the DD-WRT menus.  As you configure each router, you'll need to have a direct connection with it to a PC / LAPTOP and be mindful of the IP's on the router at any one time especially when changing the default router IP and DHCP settings while configuring the network.  In case the settings are misconfigured, one could always press the Reset button at the back of the router to revert settings back to the DD-WRT defaults:
  • Connect the Cable / DSL model directly to the basement coax / telephone cable coming in from the outside.  This ensures there's nothing else between the ISP cable going into your house and your modem, improving overall stability.
  • Label the two routers accordingly, which we'll reference here going forward.  In our case, we setup each one with Router Names as DD-WRT-INTERNET (IP: 192.168.0.1)  the other DD-WRT-OFFICE (IP: 192.168.0.2):
    Router Name: DD-WRT-INTERNET & DD-WRT-OFFICE NOTES: A laptop or another hand held device such as an ipad was handy for this step.
  • Connect the ETHERNET port of the DSL / Cable modem to the WAN port of the DD-WRT-INTERNET router:
  • Cable ETH PORT 1 of the DD-WRT-INTERNET router to the WAN port of the DD-WRT-OFFICE router as in the above image.  (In our case the CAT6 Ethernet cable was built into the house with one end of the cable in the office and the other in the basement and so requiring no special cabling or drilling.)
  • The DD-WRT-OFFICE router however, will not be able to function on the same subnet as your DD-WRT-INTERNET at this point, so connectivity issues will exist at this point.  We need to bring this router to the same functionality on our 192.168.0.N subnet.  For this we need to disable the WAN port and assign this WAN port to the Switch: WAN Disabled and assigned to Switch
    NOTE: This can be done while you still have this second router plugged into your PC / Laptop this way you do not loose connectivity.
  • On each client computer you'll connect to your setup, you can now specify the DD-WRT-INTERNET router's IP as the Gateway and / or DNS setting.
  • You're done!  The above few steps are all that was necessary to prepare your network for a dual router configuration.

Install and configure OpenVPN on your DD-WRT Router

First: (READ, install and configure, create certificates, transfer it to DD-WRT router)
http://www.howtogeek.com/64433.....rt-router/
Then:
Howto-configure-openvpn-on-your-dd-wrt-router
Does anybody know which iptables rule(s), if any, I need to add/remove in order to allow my OpenVPN clients to use my LAN's local DNS server as well?
Some key info:
-DD-WRT v24-sp2 (12/20/11) vpn-small (SVN revision 18024)
-Router: Linksys WRT160Nv3
-LAN: 192.168.7.0
-Local-Gateway / Local-DNS : 192.168.7.1
-OpenVPN-LAN: 192.168.77.0
-"No DNS Rebind" option is Disabled
-Redirect Gateway is enabled, so that all traffic is routed through the VPN.
-I did add push "dhcp-option DNS 192.168.7.1" on the OpenVPN server.
-Local DNS works fine on LAN
-I can ping from LAN to OpenVPN-LAN and viceversa. Yes, ping to local-DNS (192.168.7.1) also works.
I'm currently able to access the Internet over the VPN, but only if I either use an external (public) DNS or use plane IP addresses (no DNS at all). That is, the VPN clients fail to resolve with the local DNS. I suspect either dns requests or dns replies are being dropped by iptables (?)
Can anybody shed some light?

----------------------------------
OK, actually I found a solution for what I wanted. So I thought I'd post it here as a potential future reference for others...
Note: I won't write much details, I'll assume some technical expertise... also, please do realize the previous post has all the key info to follow this one.
1  Granting your OpenVPN clients Internet access:
you need to do NAT on the OpenVPN traffic properly with the following iptables rule, just save it as Firewall under the Administration - Commands tab.
iptables -t nat -A POSTROUTING -s 192.168.77.0/24 -o vlan2 -j SNAT --to-source $(nvram get wan_ipaddr)
2 Getting DNSMasq to resolve for your OpenVPN clients:
you need to tell DNSMasq to also listen on your virtual (OpenVPN) LAN by adding this flag in "Additional DNSMasq Options" under your Services - Services tab.
interface=tun0
----------------------------------
I recently happened to upgrade to a WRT160NL router [firmware: DD-WRT v24-sp2 (07/20/12) std]. In this router the interfaces bear different names. So, in order to maintain the same scenario as described above, you need to update the instructions in my first post as follows:
In 1/: replace vlan2 by ethx, where ethx = your WAN interface (in my case: eth1), i.e. your public IP
In 2/: replace tun0 by tunx, where tunx = your local OpenVPN interface (in my case: tun2), i.e. 192.168.77.1/24

Monday, November 5, 2012

Two routers and DD-WRT router

http://www.tomshardware.com/forum/
TC time capsule
Fios router
FIOS router connected to the TC: LAN port on Fios to WAN port on TC
I currently have a Fios network with the Verizon router's wireless radio disabled, Time Capsule running off a LAN port for wireless and wired to a server computer. I'd like to replace the wired connection to the server with a DD-WRT router. I imagine the way to do that would be to run the DD-WRT router off a different LAN port from the Fios router to the server and still leave the Time Capsule in the router for wireless purposes. 
Current set-up
192.168.1.1 (fios) and 192.168.1.2 (TC)
Fios Router (with wireless turned off) is the gateway. Running from the LAN port on there is a time capsule that I provides wireless to the house and ethernet to a desktop computer in the office.
Set up I would like
Fios router is the gateway. Time Capsule still serves wireless network for house. New router as a new network connects by ethernet to the desktop computer in the office (with the wireless on this router disabled).
Where would the New router go into the network? I imagine of the LAN port of the Fios router, but when I do that, I do not get internet connectivity through there (it does broadcast the wireless, but I can't access the router from the desktop)?

I'd like to run the dd-wrt router as gigabit-ethernet into the desktop (as a vpn) and keep the time capsule serving the wireless (under a different IP). So would it be better to run both the routers separately off the main Fios router (through LAN ports) or run the dd-wrt router behind the Time Capsule (from the TC's lan port)?
Whenever you chain routers together, LAN to WAN, you *must* use different networks, or else routing becomes ambiguous.
So if the Fios router is using the 192.168.1.x network, perhaps the TC should be using the 192.168.2.x network, or 10.0.0.x, or whatever, just as long as it's different. If you update the TC w/ a static IP of 192.168.2.1 and reboot it, it should automatically reconfigure the entire router w/ the 192.168.2.x network, including its DHCP server.
Here's the Fios
http://i1232.photobucket.com/albums/ff368/Olsoneric73/verizon.jpg
Here's the TC
http://i1232.photobucket.com/albums/ff368/Olsoneric73/airport.jpg
------
All I can really tell from those images is that indeed the two routers are using the same 192.168.1.x network. I would change the TC's static IP to 192.168.2.1, reboot it, and reboot the connected devices so they get IPs in the 192.168.2.x network.

Thursday, November 1, 2012

unknow device in Asus MoBo

unknown device under system in device manager.
under propeties of that device:
on Intel(R) 82801GB/GR (ICH7 Family) LPC Interface Controller - 27B8

MoBo: Asus p5kpl-se
http://support.asus.com/Download.aspx?SLanguage=en&m=P5KPL+SE&p=1&s=22
-----------------------------------------
Solución al Error "Dispositivo desconocido" en controladores Placa base ASUS (válido para varios modelos)
Parece ser que en Administrador de dispositivos aparece un "dispositivo desconocido" el cual no aparece como descarga de driver en la página web oficial de la marca Asus. Este dispositivo no es otro que ACPI donde en este caso concreto instala el driver de en Intel(R) ICH7 Family LPC Interface Controller - 27B8. Estos drivers se descargan en la web del fabricante pero en la sección UTILIDADES y aparece como "ACPI driver for ATK 0110 virtual device version 1043.2.15.37 for Windows 2000 / XP (32bit and 64bit) / 2003 (32bit & 64bit) / VISTA (32bit & 64bit)".
Despues de instalarlo simplemente hay que reiniciar el equipo y listo.
tecnicambalandia.blogspot.com/2012/11/unknow-device-cant-update
 ========================
Unknown Device appearing
do a google search for ATK0110..
i had the same problem in Vista, but the Vista auto-search update found it..
i believe it has to do with the ASUS Ai Booster Utility

http://www.overclockers.com/forums/showthread.php?t=498480
The driver that is missing is for the ATK0110 ACPI UTILITY, to install this driver you need to either dowload and install the driver for the ATK0110 ACPI UTILITY or install Asus Probe II, Asus AI Booster or insert your motherboard support CD in to the ROM drive, if you insert your motherboard support CD the driver should be installed automatically, dowload links below.

ATK0110 ACPI UTILITY

ASUS PC Probe II

ASUS AI Booster
 
http://vip.asus.com/forum/view.aspx?model=P5QL-E&page=1&SLanguage=en-us
http://drivers.downloadatoz.com/39653,257578/ 
============================
http://www.driveridentifier.com/scan/download.php?item_id=84898162&scanid=&hardware_id=PCI\VEN_8086%26DEV_27B8
=============================
Vista_All_OS_Intel_INF_MB.zip
============================
 Clear your cmos. Take off the battery put the jumper to 2&3 for 10mins
Do a chipset Inf update...  Read through this information..

http://vip.asus.com/forum/topic.aspx?board_id=1&model=P5KPL+SE&SLanguage=en-us 
===========================
http://downloadcenter.intel.com/confirm.as...lName=&lang=eng
===========================
http://de.drvdatabaseac.org/directoryd1.html
http://www.realtek.com.tw/downloads/
High Definition Audio Codecs (Software)
AC'97 Audio Codecs (Software)

Thursday, October 18, 2012

OpenVPN - Manual para GNU-Linux y Windows 7

This summary is not available. Please click here to view the post.