2673 |
2673 |
$cpzoneprefix = CPPREFIX . $config['captiveportal'][$cpzone]['zoneid'];
|
2674 |
2674 |
$cpips = $cpzoneprefix . '_cpips';
|
2675 |
2675 |
$authtag = $cpzoneprefix . '_auth';
|
2676 |
|
$passthrutag = $cpzoneprefix . '_passthru';
|
|
2676 |
$passthrutag = $cpzoneprefix . '_auth';
|
2677 |
2677 |
$rdr_ports = captiveportal_zone_portalports($cpcfg);
|
2678 |
2678 |
|
2679 |
2679 |
foreach (explode(",", $cpcfg['interface']) as $cpifgrp) {
|
... | ... | |
2690 |
2690 |
$rules .= "pass out quick on {$realif} proto tcp from {$cpip} port {$portalias} to any flags any ridentifier {$captiveportal_increment()} keep state(sloppy)\n";
|
2691 |
2691 |
}
|
2692 |
2692 |
/* Allowed IP/MAC passthrough */
|
2693 |
|
$rules .= "pass in quick from any to any tagged {$passthrutag} ridentifier {$captiveportal_increment()} keep state\n";
|
2694 |
|
/* block non-authenticated clients access to internet */
|
2695 |
2693 |
$rules .= "block in quick on {$realif} from any to ! <{$cpips}> ! tagged {$authtag} ridentifier {$captiveportal_increment()}\n";
|
2696 |
2694 |
}
|
2697 |
2695 |
}
|
... | ... | |
2756 |
2754 |
|
2757 |
2755 |
$cpzoneprefix = CPPREFIX . $config['captiveportal'][$cpzone]['zoneid'];
|
2758 |
2756 |
if ($anchor == 'passthrumac') {
|
2759 |
|
$tag = $cpzoneprefix . '_passthru';
|
|
2757 |
$tag = $cpzoneprefix . '_auth';
|
2760 |
2758 |
} else {
|
2761 |
2759 |
$tag = $cpzoneprefix . '_' . $anchor;
|
2762 |
2760 |
}
|
... | ... | |
2829 |
2827 |
global $g, $config, $cpzone;
|
2830 |
2828 |
|
2831 |
2829 |
$cpzoneprefix = CPPREFIX . $config['captiveportal'][$cpzone]['zoneid'];
|
2832 |
|
$tag = $cpzoneprefix . '_passthru';
|
|
2830 |
$tag = $cpzoneprefix . '_auth';
|
2833 |
2831 |
|
2834 |
2832 |
if (empty($ipent['sn'])) {
|
2835 |
2833 |
$ipent['sn'] = '32';
|
... | ... | |
2857 |
2855 |
}
|
2858 |
2856 |
|
2859 |
2857 |
$cpzoneprefix = CPPREFIX . $config['captiveportal'][$cpzone]['zoneid'];
|
2860 |
|
$tag = $cpzoneprefix . '_passthru';
|
|
2858 |
$tag = $cpzoneprefix . '_auth';
|
2861 |
2859 |
$table = $cpzoneprefix . '_hostname_' . $hostnameid;
|
2862 |
2860 |
$host = 'hostname_' . $hostnameid;
|
2863 |
2861 |
list($pipeup, $pipedown) = captiveportal_pipe_configure($ipent, 'allowed', false);
|