From: Steven Barth Date: Mon, 28 Apr 2008 08:16:07 +0000 (+0000) Subject: * Added NAT rule for Freifunk DHCP X-Git-Tag: 0.8.0~1086 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=de13f9f262da3da7bee2c48dad8be23d09528a9f;p=oweals%2Fluci.git * Added NAT rule for Freifunk DHCP --- diff --git a/module/admin-core/contrib/init.d/luci_freifunk b/module/admin-core/contrib/init.d/luci_freifunk index 663112389..d3c23e54d 100644 --- a/module/admin-core/contrib/init.d/luci_freifunk +++ b/module/admin-core/contrib/init.d/luci_freifunk @@ -10,6 +10,7 @@ start() { config_get wanif wan ifname config_get lanif lan ifname config_get ffif ff ifname + config_get ffdif ffdhcp ifname config_get lanip lan ipaddr config_get lanmask lan netmask @@ -17,6 +18,9 @@ start() { config_get ffip ff ipaddr config_get ffmask ff netmask + config_get ffdip ffdhcp ipaddr + config_get ffdmask ffdhcp netmask + [ -n "$ffif" ] || return 0 @@ -53,6 +57,13 @@ start() { iptables -t nat -A luci_freifunk_postrouting -s "$NETWORK/$PREFIX" -o "$wanif" -j MASQUERADE } + ### Freifunk DHCP to Wan + [ "$internet" -gt 0 -a -n "$ffdif" ] && { + eval "$(ipcalc.sh $ffdip $ffdmask)" + + iptables -t nat -A luci_freifunk_postrouting -s "$NETWORK/$PREFIX" -o "$wanif" -j MASQUERADE + } + ### Hook in the chains iptables -A forwarding_rule -j luci_freifunk_forwarding iptables -t nat -A postrouting_rule -j luci_freifunk_postrouting diff --git a/module/admin-core/src/view/admin_system/reboot.htm b/module/admin-core/src/view/admin_system/reboot.htm index b6c38b75c..e81be408c 100644 --- a/module/admin-core/src/view/admin_system/reboot.htm +++ b/module/admin-core/src/view/admin_system/reboot.htm @@ -6,6 +6,6 @@

<%:reboot_do Neustart durchführen%>

<% else %>

<%:reboot_running Bitte warten: Neustart wird durchgeführt...%>

- + <% end %> <%+footer%> \ No newline at end of file