summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-03 03:32:34 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-03 03:32:34 +0000
commit0968a06efe41e51a49a11d9f1021f1ef37c1545d (patch)
tree163bd3d146be42f17a4b961375b4a74bfb0ea096 /usr/local/sbin
parent1e50f7ff6c046b0065417e37dcdd4ddf6462525f (diff)
downloadpfsense-0968a06efe41e51a49a11d9f1021f1ef37c1545d.zip
pfsense-0968a06efe41e51a49a11d9f1021f1ef37c1545d.tar.gz
Show common commands in the php pfsense shell such as: * Enabling SSH * Enabling wireless on an interface (hostap, channel, ssid, etc) * Enabling DHCP Server on an interface * Disable firewall filter * Set up an interface for DHCP and enable * Set up an interface for static and enable These commands come in handy when configuring a 1 port ethernet wrap with 2 wireless cards. Sponsored-by: Bluegrass.net
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/pfSsh.php35
1 files changed, 31 insertions, 4 deletions
diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php
index 885e38e..5d8f31a 100755
--- a/usr/local/sbin/pfSsh.php
+++ b/usr/local/sbin/pfSsh.php
@@ -21,10 +21,37 @@ $shell_active = true;
echo "Example commands:\n\n";
echo " print_r(\$config);\n";
-echo " \$config['interfaces']['lan']['ipaddr'] = \"192.168.1.1\";\n";
-echo " write_config();\n";
-echo " multiline\n";
-echo " exit";
+
+echo "\n/* to enable SSH */\n";
+echo "\$config['system']['enablesshd'] = true;\n";
+
+echo "multiline\n";
+echo "exit\n";
+
+echo "\n/* change OPTX to the OPT interface name such as BACKHAUL */\n";
+echo "\$config['interfaces']['optx']['wireless']['standard'] = \"11a\";\n";
+echo "\$config['interfaces']['optx']['wireless']['mode'] = \"hostap\";\n";
+echo "\$config['interfaces']['optx']['wireless']['channel'] = \"6\";\n";
+
+echo "\n/* to enable server */\n";
+echo "\$config['dhcpd']['optx']['enable'] = true;\n";
+echo "\$config['dhcpd']['optx']['range']['from'] = \"192.168.31.100\";\n";
+echo "\$config['dhcpd']['optx']['range']['to'] = \"192.168.31.150\";\n";
+
+echo "\n/* to disable the firewall filter */\n";
+echo "\$config['system']['disablefilter'] = true;\n";
+
+echo "\n/* to enable an interface and set it for dhcp */\n";
+echo "\$config['interfaces']['optx']['disabled'] = false;\n";
+echo "\$config['interfaces']['optx']['ipaddr'] = \"dhcp\";\n";
+
+echo "\n/* to enable an interface and set a static ip address */\n";
+echo "\$config['interfaces']['wan']['disabled'] = false;\n";
+echo "\$config['interfaces']['wan']['ipaddr'] = \"192.168.100.1\";\n";
+echo "\$config['interfaces']['wan']['subnet'] = \"24\";\n";
+
+echo "/* to save out the new configuration (config.xml) */\n";
+echo "write_config();\n";
while($shell_active == true) {
echo "\n\npfSense shell> ";
OpenPOWER on IntegriCloud