Hi, what about add option for reflection to GUI?
All we need add option to /etc/config/firewall for section redirect
opton reflaction '1'
oprion reflection_src 'external'
In GUI make checkbox for reflection and when reflection active activate choise menu internal/external ip
I searched how make NAT loopback 3 days and found only manual method - edit etc/config/firewall
ver 1.7.1
NAT Loopback
Moderator: Moderators
NAT Loopback
Last edited by repeat on Tue Jun 23, 2015 4:24 pm, edited 1 time in total.
Re: NAT loopback GUI
I try add this but i'm not coder.
1st step change template for choice option
/www/templates/single_forward_template
1st step change template for choice option
/www/templates/single_forward_template
Code: Select all
<table>
<tr class='table_row_add_header'>
<th><label id='add_desc_label' for='add_desc'><%~ port.Desc %></label><br><em><%~ optl %></em></th>
<th><label id='add_prot_label' for='add_prot'><%~ Proto %></label></th>
<th><label id='add_fp_label' for='add_fp'><%~ FPrt %></label></th>
<th><label id='add_ip_label' for='add_ip'><%~ TIP %></label></th>
<th><label id='add_dp_label' for='add_dp'><%~ TPrt %><br><em><%~ optl %></em></label></th>
<th><label id='add_refl_label' for='add_refl'><%~ Refl %></label></th>
<th></th>
</tr>
<tr class='table_row_add'>
<td><input type='text' id='add_desc' size='10' maxLength='32'/></td>
<td><select id='add_prot'><option value='<%~ both %>'><%~ both %></option><option value='TCP'>TCP</option><option value='UDP'>UDP</option></select></td>
<td><input type='text' id='add_fp' size='5' onkeyup='proofreadNumericRange(this,1,65535)' maxLength='5'/></td>
<td><input type='text' id='add_ip' size='20' onkeyup='proofreadIp(this)' maxLength='15'/></td>
<td><input type='text' id='add_dp' size='5' onkeyup='proofreadNumeric(this,1,65535)' maxLength='5'/></td>
<td><select id='add_refl'><option value='-'><%~ Disable %></option><option value='internal'><%~ internal_IP %></option><option value='external'><%~ external_IP %></option></select></td>
<td><input type='button' id='add_button' value='<%~ Add %>' class='default_button' onclick='addPortfRule()'/></td>
</tr>
</table>
Re: NAT loopback GUI
Today i can't do option for GUI
Fast fix for me (remember backup) replace file /www/js/port_forwarding.js
http://pastebin.com/V2KeA9sA
This is JavaScript add redirect rules (port forarding) with NAT Loopback (hairpin) enabled
Fast fix for me (remember backup) replace file /www/js/port_forwarding.js
http://pastebin.com/V2KeA9sA
This is JavaScript add redirect rules (port forarding) with NAT Loopback (hairpin) enabled