DHCP & Router Scripts

The mlinux-scripts recipe provides a small set of simple scripts that are useful for demos, testing, and as examples for developers. They are not intended to be full-featured scripts that cover a wide-range of use cases.

mlinux-dhcpd

Simple script to stop and start the busybox udhcpd server. To edit dhcpd config, edit /etc/udhcpd.conf. The default configuration works with the default IP address of 192.168.2.1 and subnet mask of 255.255.255.0.

  Usage: mlinux-dhcpd start|stop|restart

mlinux-cell-router

Configures the device as a basic network router/firewall. All incoming connections on the WAN are blocked by default and all outbound traffic from the LAN is allowed. Enables IP forwarding and masquerading/NAT.

  Usage: mlinux-cell-router start|stop [options]
    options:
      -l  LAN interfaces to allow, comma-separated (defaults to "eth0")
      -w   WAN interface to route out (defaults to "ppp0")
Ethernet to Cellular router example
$ mlinux-set-apn APN (one-time only for GSM connections)
$ mlinux-cell-router start
$ mlinux-dhcpd start
$ pppd call gsm