Re: USB networking with Ubuntu 9.04

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sander van Grieken
Date: Thursday, October 8, 2009 - 3:21 am

Why use a script that you need to run manually each time?

It can be done automatically just by putting the right stuff in /etc/network/interfaces:

auto eth2
iface eth2 inet static
  address 192.168.0.200
  netmask 255.255.255.0
  post-up iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
  post-up echo 1 > /proc/sys/net/ipv4/ip_forward
  post-up route add -host 192.168.0.202 dev eth2
  post-up dnsmasq
  pre-down echo 0 > /proc/sys/net/ipv4/ip_forward
  pre-down iptables -t nat -D POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
  pre-down killall dnsmasq


when you plug in the FR, eth2 will activate automatically..

grtz
Sander


On Thursday 08 October 2009 03:24:06 Cristian Gómez wrote:

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USB networking with Ubuntu 9.04, Tony Berth, (Tue Oct 6, 9:04 am)
Re: USB networking with Ubuntu 9.04, Frederik Sdun, (Tue Oct 6, 12:00 pm)
Re: USB networking with Ubuntu 9.04, Tony Berth, (Tue Oct 6, 12:40 pm)
Re: USB networking with Ubuntu 9.04, Matthias Huber, (Tue Oct 6, 12:54 pm)
Re: USB networking with Ubuntu 9.04, =?ISO-8859-1?Q?Crist ..., (Tue Oct 6, 8:23 pm)
Re: USB networking with Ubuntu 9.04, Tony Berth, (Tue Oct 6, 11:52 pm)
Re: USB networking with Ubuntu 9.04, Matthias Huber, (Wed Oct 7, 12:27 am)
Re: USB networking with Ubuntu 9.04, Tony Berth, (Wed Oct 7, 11:02 am)
Re: USB networking with Ubuntu 9.04, =?ISO-8859-1?Q?Crist ..., (Wed Oct 7, 6:24 pm)
Re: USB networking with Ubuntu 9.04, Sander van Grieken, (Thu Oct 8, 3:21 am)
Re: USB networking with Ubuntu 9.04, Tony Berth, (Thu Oct 8, 12:15 pm)
Re: USB networking with Ubuntu 9.04, Eric Olson, (Thu Oct 8, 1:19 pm)