Configuración en el ordenador(Linux/FreeBSD) usando el móvil conectado a Internet con tethering por

Apaga la red inalámbrica en el móvil y en el ordenador. Conecta el móvil al ordenador por USB y cambia la configuración en el ordenador, en especial:

  1. La dirección IP por defecto debe ir a 10.42.0.1

  2. El servicio para resolver nombres (DNS) debe ser 10.42.0.1

  3. Reinicia servicios como sendmail, postfix etcétera.

Yo uso un pequeño script /usr/local/etc/devd/bq.sh que contiene:

#!/bin/sh
#
# change routing (...) to the Ubuntu phone BQ Aqaris E4.5
#
ifconfig ue0 || {
    printf "interface ue0 not found -- exit.\n"
    exit 1
}

ifconfig wlan0 down 
route delete default

killall dhclient
rm -f /etc/resolv.conf
dhclient ue0
# route add default 10.42.0.1

test -f /etc/resolv.conf || {
    cat < /etc/resolv.conf 
# Generated by ~guru/route2BQ.sh
nameserver 10.42.0.1
EOF
    }

/etc/rc.d/sendmail stop
sleep 3
/etc/rc.d/sendmail start

El demonio devd ejecuta dicho script automáticamente con esta configuración en el fichero /usr/local/etc/devd/bq.conf :

#
# When the interface ue0 comes up we do in a script:
# 1) start of dhclient for interface ue0
# 2) default route to interface ue0
# 3) restart of sendmail
#
# , June 2015
#
notify 1 {
    match "system"        "IFNET";
    match "subsystem"    "ue0";
    match "type"        "ATTACH";
    action "/usr/local/etc/devd/bq.sh $subsystem $type";
};

Última actualización: jueves, 19 de noviembre de 2015, 20:44:29 CET

Last updated