Disable Wifi in the phone and in the netbook (if the Wifi there is not routed to Internet);
Configuration:
Enable USB network with the phone;
Adjust default route and DNS (/etc/resolv.conf) in the netbook to the IP of the phone 10.42.0.1;
Restart sendmail in the netbook; and all is fine
I crafted a script /usr/local/etc/devd/bq.sh for this:
#!/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 downroute delete defaultkillall dhclientrm -f /etc/resolv.confdhclient ue0# route add default 10.42.0.1test -f /etc/resolv.conf || {cat < /etc/resolv.conf# Generated by ~guru/route2BQ.shnameserver 10.42.0.1EOF}/etc/rc.d/sendmail stopsleep 3/etc/rc.d/sendmail start
This script is executed on the fly (i.e. on plug-in of the USB with tethering enabled) by a FreeBSD devd(8) hook in /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";};
Last updated: Sat Oct 17 13:09:43 CEST 2015