Skip to content

Instantly share code, notes, and snippets.

@mildred
Created January 29, 2016 20:24
Show Gist options
  • Save mildred/a1747e1afc0f1633f648 to your computer and use it in GitHub Desktop.
Save mildred/a1747e1afc0f1633f648 to your computer and use it in GitHub Desktop.
openwrt and raspberry config

OpenWRT Configuration

This configuration makes a WAN interface from a gretun tunnel. The WAN IP is configured in DHCP.

In this configuration, the WAN is the private network of a 4G LTE modem/router that is plugged into a raspberry pi on the house wall. The raspberry py provides the modem/router network on a gretun tunnel.

  • uptun0: gretap tunnel to raspberry py, attaches to upbridge0
  • upbridge0: dhcp client to uplink (the gretap tunnel

RaspberryPi configuration

TODO

config zone
option name 'wan'
...
option network 'upbridge0 ...'
config interface 'uptun0'
option ifname 'uptun0'
option ipaddr '192.168.1.1'
option peeraddr '192.168.1.10'
option mtu '1400'
option proto 'gretap'
option network 'upbridge0'
config route
option target '0.0.0.0'
option netmask '0.0.0.0'
option gateway '192.168.8.1'
option interface 'upbridge0'
config interface 'upbridge0'
option type 'bridge'
option auto '1'
option proto 'dhcp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment