On 11 Dec 18:36, Chris Green wrote:
If I have a laptop with a 3G internet connection provided by a USB dongle is it fairly easy to allow other systems to use the internet connection via the laptop's ethernet port?
E.g. if I run something like dnsmasq on the laptop it can be a DHCP and DNS server so that anything connected (directly or via a switch) should work shouldn't it?
Ish... assuming that you're not using network manager ;)
If you are using network manager, you'll need to get it to ignore eth0 for a bit, then configure eth0 with a static ip in the range that you're going to serve with dnsmasq, fire up dnsmasq on eth0 (something like: dnsmasq --dhcp-range 192.168.92.10,192.168.92.250,255.255.255.0 -i eth0), you'll also need to turn on masquerading and ip forwarding, the simplest (and least secure, but fine for temporary measures), way to do this is:
sysctl net.ipv4.ip_forward=1 iptables -t nat -A POSTROUTING --source 192.168.92.0/24 -j MASQUERADE
Then bob should be your mums dads sons brother, or something.