Changeset 19211
- Timestamp:
- 05/07/12 21:00:27 (14 months ago)
- Location:
- src/router
- Files:
-
- 5 edited
-
kromo/dd-wrt/lang_pack/english.js (modified) (1 diff)
-
openvpn/config2/openvpn.nvramconfig (modified) (1 diff)
-
openvpn/config2/openvpn.webvpn (modified) (1 diff)
-
services/services/openvpn.c (modified) (3 diffs)
-
services/sysinit/defaults.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/kromo/dd-wrt/lang_pack/english.js
r18491 r19211 1374 1374 service.vpnd_clcon="Client connect script"; 1375 1375 service.vpnd_ccddef="CCD-Dir DEFAULT file"; 1376 service.vpnd_dhcpbl="Block DHCP accross the tunnel"; 1376 1377 service.vpn_redirgate="Redirect default Gateway"; 1377 1378 service.vpn_legend="OpenVPN Client"; -
src/router/openvpn/config2/openvpn.nvramconfig
r18811 r19211 30 30 "openvpn_proxy" "DHCP-Proxy mode" "CHOICE" "2" "0" "1" "FALSE" "0" 31 31 "openvpn_ccddef" "OpenVPN ccd dir DEFAULT file" "NULL" "FALSE" "0" 32 "openvpn_dhcpbl" "Block DHCP" "CHOICE" "2" "0" "1" "FALSE" "0" -
src/router/openvpn/config2/openvpn.webvpn
r18793 r19211 55 55 <div class="setting"> 56 56 <div class="label"><% tran("service.vpnd_mask"); %></div> 57 <input size="15" maxlength="15" name="openvpn_mask_br" value="<% nvram_get("openvpn_mask"); %>" /> 58 </div> 59 </div> 60 </div> 61 57 <input size="15" maxlength="15" name="openvpn_mask" value="<% nvram_get("openvpn_mask"); %>" /> 58 </div> 59 <div class="setting"> 60 <div class="label"><% tran("service.vpnd_dhcpbl"); %></div> 61 <input class="spaceradio" type="radio" name="openvpn_dhcpbl" value="1" <% nvram_checked("openvpn_dhcpbl", "1"); %> /><% tran("share.enable"); %> 62 <input class="spaceradio" type="radio" name="openvpn_dhcpbl" value="0" <% nvram_checked("openvpn_dhcpbl", "0"); %> /><% tran("share.disable"); %> 63 </div> 64 </div> 65 </div> 62 66 <div class="setting"> 63 67 <div class="label"><% tran("share.port"); %></div> -
src/router/services/services/openvpn.c
r19190 r19211 177 177 "ebtables -A OUTPUT -o tap2 --pkttype-type multicast -j DROP\n"); 178 178 //for testing only 179 //if (nvram_match("openvpn_dhcpbl", "1") //block dhcp on bridged vpns180 //&& nvram_match("openvpn_tuntap", "tap")181 //&& nvram_match("openvpn_proxy", "0"))179 if (nvram_match("openvpn_dhcpbl", "1") //block dhcp on bridged vpns 180 && nvram_match("openvpn_tuntap", "tap") 181 && nvram_match("openvpn_proxy", "0")) 182 182 fprintf(fp, "insmod ebtables\n" 183 183 "insmod ebtable_filter\n" "insmod ebt_ip\n" … … 199 199 fprintf(fp, "gpio disable %s\n", gpiovpn); 200 200 #endif 201 if (nvram_match("openvpn_tuntap", "tap")) {201 if (nvram_match("openvpn_tuntap", "tap")) 202 202 fprintf(fp, "brctl delif br0 tap2\n" "ifconfig tap2 down\n"); 203 }204 if (nvram_match("block_multicast", "0") //block multicast on bridged vpns205 && nvram_match("openvpn_tuntap", "tap"))206 fprintf(fp,207 "ebtables -D FORWARD -o tap2 --pkttype-type multicast -j DROP\n"208 "ebtables -D OUTPUT -o tap2 --pkttype-type multicast -j DROP\n");209 if (nvram_match("openvpn_dhcpbl", "1") //block dhcp on bridged vpns210 && nvram_match("openvpn_tuntap", "tap")211 && nvram_match("openvpn_proxy", "0"))212 fprintf(fp,213 "ebtables -D INPUT -i tap2 --protocol IPv4 --ip-proto udp --ip-sport 67:68 -j DROP\n"214 "ebtables -D FORWARD -i tap2 --protocol IPv4 --ip-proto udp --ip-sport 67:68 -j DROP\n"215 "ebtables -D FORWARD -o tap2 --protocol IPv4 --ip-proto udp --ip-sport 67:68 -j DROP\n");216 203 fclose(fp); 217 204 … … 247 234 eval("stopservice", "wshaper"); 248 235 eval("startservice", "wshaper"); 236 //remove btables rules on shutdown 237 sytem("ebtables -D FORWARD -o tap2 --pkttype-type multicast -j DROP\n"); 238 sytem("ebtables -D OUTPUT -o tap2 --pkttype-type multicast -j DROP\n"); 239 sytem("ebtables -D INPUT -i tap2 --protocol IPv4 --ip-proto udp --ip-sport 67:68 -j DROP\n"); 240 sytem("ebtables -D FORWARD -i tap2 --protocol IPv4 --ip-proto udp --ip-sport 67:68 -j DROP\n"); 241 sytem("ebtables -D FORWARD -o tap2 --protocol IPv4 --ip-proto udp --ip-sport 67:68 -j DROP\n"); 249 242 } 250 243 -
src/router/services/sysinit/defaults.c
r19210 r19211 2521 2521 {"openvpn_proxy", "0", 0}, 2522 2522 {"openvpn_ccddef", "", 0}, 2523 {"openvpn_dhcpbl", "0", 0}, 2523 2524 2524 2525 #endif
Note: See TracChangeset
for help on using the changeset viewer.
