Merge pull request #413 from oneru/for-15.05
Luci-app-fwknopd:add a couple config options to the interface
This commit is contained in:
commit
c2d3b9ed4f
4 changed files with 25 additions and 0 deletions
|
@ -46,6 +46,8 @@ s = m:section(TypedSection, "config", translate("fwknopd.conf config options"))
|
||||||
s.anonymous=true
|
s.anonymous=true
|
||||||
s.dynamic=true
|
s.dynamic=true
|
||||||
s:option(Value, "MAX_SPA_PACKET_AGE", "MAX_SPA_PACKET_AGE", translate("Maximum age in seconds that an SPA packet will be accepted. defaults to 120 seconds"))
|
s:option(Value, "MAX_SPA_PACKET_AGE", "MAX_SPA_PACKET_AGE", translate("Maximum age in seconds that an SPA packet will be accepted. defaults to 120 seconds"))
|
||||||
|
s:option(Value, "PCAP_INTF", "PCAP_INTF", translate("Specify the ethernet interface on which fwknopd will sniff packets."))
|
||||||
|
s:option(Value, "ENABLE_IPT_FORWARDING", "ENABLE_IPT_FORWARDING", translate("Allow SPA clients to request access to services through an iptables firewall instead of just to it."))
|
||||||
s:option(DummyValue, "note2", translate("Enter custom fwknopd.conf variables below:"))
|
s:option(DummyValue, "note2", translate("Enter custom fwknopd.conf variables below:"))
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -10,6 +10,13 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Allow SPA clients to request access to services through an iptables firewall "
|
||||||
|
"instead of just to it."
|
||||||
|
msgstr ""
|
||||||
|
"Allow SPA clients to request access to services through an iptables firewall "
|
||||||
|
"instead of just to it."
|
||||||
|
|
||||||
msgid "Base 64 key"
|
msgid "Base 64 key"
|
||||||
msgstr "Base 64 key"
|
msgstr "Base 64 key"
|
||||||
|
|
||||||
|
@ -83,6 +90,9 @@ msgstr ""
|
||||||
msgid "Normal Key"
|
msgid "Normal Key"
|
||||||
msgstr "Normal Key"
|
msgstr "Normal Key"
|
||||||
|
|
||||||
|
msgid "Specify the ethernet interface on which fwknopd will sniff packets."
|
||||||
|
msgstr "Specify the ethernet interface on which fwknopd will sniff packets."
|
||||||
|
|
||||||
msgid "The base64 hmac key"
|
msgid "The base64 hmac key"
|
||||||
msgstr "The base64 hmac key"
|
msgstr "The base64 hmac key"
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Allow SPA clients to request access to services through an iptables firewall "
|
||||||
|
"instead of just to it."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Base 64 key"
|
msgid "Base 64 key"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -57,6 +62,9 @@ msgstr ""
|
||||||
msgid "Normal Key"
|
msgid "Normal Key"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Specify the ethernet interface on which fwknopd will sniff packets."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "The base64 hmac key"
|
msgid "The base64 hmac key"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#-- Copyright 2015 Jonathan Bennett <jbennett@incomsystems.biz>
|
#-- Copyright 2015 Jonathan Bennett <jbennett@incomsystems.biz>
|
||||||
#-- Licensed to the public under the GNU General Public License v2.
|
#-- Licensed to the public under the GNU General Public License v2.
|
||||||
|
. /lib/functions/network.sh
|
||||||
|
|
||||||
uci batch <<EOF
|
uci batch <<EOF
|
||||||
add ucitrack fwknopd
|
add ucitrack fwknopd
|
||||||
|
@ -8,10 +9,14 @@ uci batch <<EOF
|
||||||
commit ucitrack
|
commit ucitrack
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
uci delete fwknopd.@access[0].KEY
|
||||||
|
uci delete fwknopd.@access[0].HMAC_KEY
|
||||||
uci set fwknopd.@access[0].keytype='Base 64 key'
|
uci set fwknopd.@access[0].keytype='Base 64 key'
|
||||||
uci set fwknopd.@access[0].hkeytype='Base 64 key'
|
uci set fwknopd.@access[0].hkeytype='Base 64 key'
|
||||||
uci set fwknopd.@access[0].KEY_BASE64=`fwknopd --key-gen | awk '/^KEY/ {print $2;}'`
|
uci set fwknopd.@access[0].KEY_BASE64=`fwknopd --key-gen | awk '/^KEY/ {print $2;}'`
|
||||||
uci set fwknopd.@access[0].HMAC_KEY_BASE64=`fwknopd --key-gen | awk '/^HMAC/ {print $2;}'`
|
uci set fwknopd.@access[0].HMAC_KEY_BASE64=`fwknopd --key-gen | awk '/^HMAC/ {print $2;}'`
|
||||||
|
uci set fwknopd.@config[0].ENABLE_IPT_FORWARDING='y'
|
||||||
|
|
||||||
uci commit fwknopd
|
uci commit fwknopd
|
||||||
rm -f /tmp/luci-indexcache
|
rm -f /tmp/luci-indexcache
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue