Ignore:
Timestamp:
Apr 6, 2015, 1:03:33 PM (10 years ago)
Author:
chronos
Message:
  • Added: Support for Internet free access. Unregistered users are redirected to activation page where they can found useful information and activate free access for 24 hours.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php

    r617 r735  
    109109$Items[] = array('chain' => 'dstnat', 'dst-address' => '212.111.4.174', 'protocol' => 'udp', 'dst-port' => 53, 'in-interface' => $InetInterface, 'action' => 'dst-nat', 'to-addresses' => '10.145.64.8', 'to-ports' => 53, 'comment' => 'DNS_redirection_UDP');
    110110
    111 
    112111// Chain for local interface
    113112$Items[] = array('chain' => 'srcnat', 'out-interface' => $LocalInterface, 'action' => 'jump', 'jump-target' => 'local-out', 'comment' => 'local-out');
    114113$Items[] = array('chain' => 'dstnat', 'in-interface' => $LocalInterface, 'action' => 'jump', 'jump-target' => 'local-in', 'comment' => 'local-in');
     114
     115// Accept free-access clients
     116$Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
     117        'src-address-list' => 'free-access', 'in-interface' => $LocalInterface,
     118        'action' => 'accept', 'comment' => 'Free_access');
     119// Redirect unregistred clients to free access activation page
     120$Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
     121        'src-address-list' => 'unregistred', 'in-interface' => $LocalInterface,
     122        'action' => 'dst-nat', 'to-addresses' => '10.145.64.8', 'to-ports' => 82, 'comment' => 'Redirect_unregistred');
    115123
    116124/*
Note: See TracChangeset for help on using the changeset viewer.