-
Notifications
You must be signed in to change notification settings - Fork 0
/
portOpenerConfig.php
20 lines (18 loc) · 1.19 KB
/
portOpenerConfig.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
define('DEBUG', FALSE);
define('MAILTO', '[email protected]');
define('IPTABLES', '/sbin/iptables');
// you may need to adjust this for your system
// which iptables from the command line should give you the complete path to the iptables program
// the sudo command is required because iptables commands must be run as root
define('COMMANDS', 'sudo ' . __DIR__ . '/portOpenerCommands.php');
// in order for the web page to successfully execute the sudo command
// an entry must be made in the sudoers file which is typically located at:
// /etc/sudoers. The preferred method for editing this file is to issue the following command as root:
// root@host$visudo
// A line must be added to allow the user executing apache (typically apache or www-data) to run the
// portOpenerCommands.php file as root without entering a password.
// Assuming the apache user is apache, and the file is located at /var/www/_secure/portOpenerCommands.php
// the sudoers line would be the following:
// apache ALL=(root) NOPASSWD: /var/www/stiffpool/_secure/portOpenerCommands.php
// if you want to be more restrictive, the ALL before the = may be replaced bty the hostname of the server