Gentoo Archives: gentoo-user

From: Dan Johansson <Dan.Johansson@×××.nu>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Automatic network configuration for USB connected device
Date: Sat, 06 Sep 2008 13:11:04
Message-Id: 200809061511.00267.Dan.Johansson@dmj.nu
1 I have bought me a new toy - an Openmoko Freerunner.
2 Each time I connect it to my Gentoo-box I must configure the usb0 device on
3 the Gentoo-box as follows:
4 ifconfig usb0 192.168.0.200 netmask 255.255.255.248
5 After that I can without problem ssh to the Freerunner. Now I want the above
6 to be automatically done when I connect the Freerunner. I have found the the
7 following description for Ubunto:
8
9 Add the following lines to your /etc/network/interfaces :
10 allow-hotplug usb0
11 auto usb0
12 iface usb0 inet static
13 address 192.168.0.200
14 netmask 255.255.255.0
15 network 192.168.0.0
16 up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 &
17 up echo 1 > /proc/sys/net/ipv4/ip_forward &
18 up iptables -P FORWARD ACCEPT &
19 down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
20
21 What would be the corresponding file(s) on Gentoo?
22 Regards,
23 --
24 Dan Johansson, <http://www.dmj.nu>
25 ***************************************************
26 This message is printed on 100% recycled electrons!
27 ***************************************************

Attachments

File name MIME type
smime.p7s application/pkcs7-signature

Replies