Skip to content

Instantly share code, notes, and snippets.

@steveb
Last active December 14, 2015 05:09
Show Gist options
  • Save steveb/5033074 to your computer and use it in GitHub Desktop.
Save steveb/5033074 to your computer and use it in GitHub Desktop.
root@raspberrypi:/etc# cat network/interfaces
auto lo br0
iface lo inet loopback
pre-up iptables-restore < /etc/iptables.bridge.rules
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface eth0 inet manual
iface eth1 inet manual
allow-hotplug eth1
iface br0 inet static
bridge_ports eth0 eth1
address 192.168.1.200
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
root@raspberrypi:/etc# cat iptables.bridge.rules
*nat
-A PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 3128
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment