use this script and place it under /etc/hotplug.d/usb/40-e355
#!/bin/bash
#
# Hotplug script for Huawei E355 3G Modem
#
# Vendor ID: 12d1/14db/102
#
logger Pineapple.modem: New device found $PRODUCT
[[ $PRODUCT == "12d1/14db/102" ]] && {
[[ $ACTION == "add" ]] && {
ifconfig eth1 192.168.1.100 netmask 255.255.255.0 up
route del default
route add default gw 192.168.1.1 eth1
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o eth1 -j MASQUERADE
iptables -A FORWARD -s 172.16.42.0/24 -o eth1 -j ACCEPT
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i eth1 -j ACCEPT
logger Pineapple.modem: Huawei E355 Added
} || {
iptables -t nat -D POSTROUTING -s 172.16.42.0/24 -o eth1 -j MASQUERADE
iptables -D FORWARD -s 172.16.42.0/24 -o eth1 -j ACCEPT
iptables -D FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i eth1 -j ACCEPT
/etc/init.d/network restart
logger Pineapple.modem: Huawei E355 Removed
}
}
the script is adapted fron a hak5 tutorial video with the content of 3G modems
if you flash your firmware the script will be deleted, so place it also under /sd/etc/hotplug.d/usb/40-e355
so you can simply copy it after firmware update.
greetz VattafarI