auto lo iface lo inet loopback # The primary network interface auto eth0 #iface eth0 inet dhcp allow-hotplug usb0 mapping hotplug script grep map usb0 iface usb0 inet static address 192.168.2.14 netmask 255.255.255.0 broadcast 192.168.2.255 # up iptables -I INPUT 1 -s 192.168.2.15 -j ACCEPT up iptables -t nat -A POSTROUTING -o eth0 -s 192.168.2.15 -j MASQUERADE up echo 1 > /proc/sys/net/ipv4/ip_forward down iptables -t nat -D POSTROUTING -o eth0 -s 192.168.2.15 -j MASQUERADE down echo 0 > /proc/sys/net/ipv4/ip_forward iface br3 inet dhcp hostname ash pre-up echo "Adding ethernet bridge between LAN and PAN" pre-up ifconfig ath0 0.0.0.0 pre-up brctl addbr br3 pre-up brctl setfd br3 0 pre-up brctl stp br3 off pre-up brctl addif br3 ath0 pre-down echo "Removing ethernet bridge between LAN and PAN" post-down brctl delif br3 ath0 post-down brctl delbr br3 post-down ifdown ath0 post-down ifup ath0
$ sudo ifup usb0 SIOCSIFADDR: No such device usb0: ERROR while getting interface flags: No such device SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device usb0: ERROR while getting interface flags: No such device usb0: ERROR while getting interface flags: No such device Failed to bring up usb0.
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto usb0 iface usb0 inet static address 192.168.2.15 netmask 255.255.255.0 gateway 192.168.2.14
Nokia-N810-43-7:~# ifdown usb0 mc-disconnect[2548]: GLIB DEBUG default - checking MC status mc-disconnect[2548]: GLIB DEBUG default - mission_control_get_presence: MC not running. run-parts: /etc/network/if-post-down.d/zz_proxy_unset exited with return code 1 Nokia-N810-43-7:~# ifup usb0 run-parts: /etc/network/if-up.d/00_proxy_set exited with return code 1