From cfdce2add91f7fbf17094f4b636e6d5488cc4094 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 16 Apr 2010 19:08:32 +0000 Subject: Ticket #508. Make TFTP proxy configurable by System Advanced->Firewall/NAT for several interfaces. --- etc/inc/filter.inc | 11 +++++++++-- usr/local/www/system_advanced_firewall.php | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index a143a31..bee212a 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1062,6 +1062,14 @@ function filter_nat_rules_generate() { $natrules .= "# TFTP proxy\n"; $natrules .= "rdr-anchor \"tftp-proxy/*\"\n"; + if (!empty($config['system']['tftpinterface'])) { + $tftpifs = explode(",", $config['system']['tftpinterface']); + foreach($tftpifs as $tftpif) { + if ($FilterIflist[$tftpif]) + $natrules .= "rdr pass on {$FilterIflist[$tftpif]['if']} proto udp from any to any port tftp -> 127.0.0.1 port tftp\n"; + } + } + $interface_counter = 0; $vpns_list = filter_get_vpns_list(); $direct_networks_list = filter_get_direct_networks_list(); @@ -2016,8 +2024,7 @@ EOD; # package manager late specific hook anchor "packagelate" -EOD; - $ipfrules .= << + TFTP Proxy + + + Choose the interfaces where you want TFTP proxy help to be enabled. + + +   -- cgit v1.1