Ignore:
Timestamp:
Jul 25, 2009, 7:31:03 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Přečíslování veřejného rozsahu adres. * Upraveno: Generování DNS záznamů bylo sjednoceno do jedné parametrické funkce.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/nat_routerboard.php

    r213 r235  
    2222    echo($Name.'('.$Interface['LocalIP'].'), ');
    2323    $Commands[] = ' /ip firewall nat add chain=srcnat src-address='.$Interface['LocalIP'].' out-interface='.$InetInterface.' action=src-nat to-addresses='.$Interface['ExternalIP'].' comment="'.$Name.'"';
     24    $Commands[] = ' /ip firewall nat add chain=dstnat dst-address='.$Interface['ExternalIP'].' in-interface='.$InetInterface.' action=dst-nat to-addresses='.$Interface['LocalIP'].' comment="'.$Name.'"';
     25
     26    // Temporary old incoming public subnet range
     27    $ExternalIPParts = explode('.', $Interface['ExternalIP']);
     28    $ExternalIPParts[0] = 85;
     29    $ExternalIPParts[1] = 92;
     30    $ExternalIPParts[2] = 50;
     31    $Interface['ExternalIP'] = implode('.', $ExternalIPParts);
    2432    $Commands[] = ' /ip firewall nat add chain=dstnat dst-address='.$Interface['ExternalIP'].' in-interface='.$InetInterface.' action=dst-nat to-addresses='.$Interface['LocalIP'].' comment="'.$Name.'"';
    2533  }
Note: See TracChangeset for help on using the changeset viewer.