summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-03 03:32:40 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-03 03:32:40 +0000
commit03b85ded5b2c395275a112c18d8ebbe7ecde1606 (patch)
treea2dd1d0963b1cd38081ef4ca766afdc6f1fbde96 /usr/local
parent5a6f3ca0afa353260c9911458faf03f91d16b65b (diff)
downloadpfsense-03b85ded5b2c395275a112c18d8ebbe7ecde1606.zip
pfsense-03b85ded5b2c395275a112c18d8ebbe7ecde1606.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')
-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