Ig 4 Command Line Interface Reference: Document Release 1.01
Ig 4 Command Line Interface Reference: Document Release 1.01
DISCLAIMER
No part of this manual may be copied, distributed, transmitted,
transcribed, stored in a retrieval system or translated into any human or
computer language, in any form or by any means, electronic or
otherwise, without the express written permission of ANTlabs.
INTRODUCTION ........................................................................................ 6
Overview .............................................................................................. 6
Command Syntax .................................................................................. 6
Chapter 1 .................................................................................................. 8
NETWORK SERVICE COMMANDS ................................................................ 8
dns ...................................................................................................... 8
email .................................................................................................... 8
ip ......................................................................................................... 9
ntpd ..................................................................................................... 9
netpx_conf ......................................................................................... 10
syslog ................................................................................................ 14
webpx ................................................................................................ 14
websv ................................................................................................ 15
Chapter 2 ................................................................................................ 16
SYSTEM SECURITY COMMANDS ............................................................... 16
webadm ............................................................................................. 16
wadacc ............................................................................................... 16
enasup ............................................................................................... 17
passwd_sup ........................................................................................ 17
Chapter 3 ................................................................................................ 18
STATUS AND LOG COMMANDS ................................................................. 18
status ................................................................................................. 18
sessions ............................................................................................. 18
session_log......................................................................................... 19
show .................................................................................................. 19
usage_log........................................................................................... 19
users .................................................................................................. 19
Chapter 4 ................................................................................................ 20
SYSTEM COMMANDS................................................................................ 20
help ................................................................................................... 20
reboot ................................................................................................ 20
shutdown ........................................................................................... 20
restart ................................................................................................ 20
sshtun ................................................................................................ 21
check ................................................................................................. 21
exit .................................................................................................... 22
save_snapshot .................................................................................... 22
restore_firmware ................................................................................ 22
restore_snapshot ................................................................................ 22
Chapter 5 ................................................................................................ 23
UNIX SHELL COMMANDS .......................................................................... 23
AUDIENCE
This manual is intended for administrators who will be responsible for the
installation and configuration of the IG 4.
This manual describes the commands accessible via the Command Line
Interface.
RELATED DOCUMENTATION
ANTlabs welcomes all comments and suggestions on the quality and usefulness
of this document. Our users’ feedback is an important component of the
information used for improvement of this document.
Also, please include the chapter, section and/or page number when referring
to specific portions of the document.
Overview
This documentation provides a reference for the various commands that are
available to aid in configuring the IG 4.
In addition, the CLI also supports a subset of the Unix Shell commands which
are listed in chapter UNIX SHELL COMMANDS.
Command Syntax
The basic command syntax is as follows:
Some keywords are common throughout the majority of commands and are
described in the table below. The keywords apply to most commands except
for the show command, where the syntax is different. Also, some system
commands like shutdown, reboot and password do not have any options.
dns
Using this command, the parameters of the DNS, like the parent DNS to be
used by the IG 4 for name resolutions can be configured.
Using the keyword set, a list of space separated DNS values can be specified
and the command will update the DNS configurations to the new value(s):
dns set parent 192.168.124.8 8.8.8.8
email
Parameters of the SMTP server can be configured with this command.
Enable/Disable Options
system_email Enable/disable use of system administrator’s
email (in place of postmaster’s email).
forward_to_ip Enable/disable email forwarding to the external
SMTP server.
ip
Using this command, the upstream interface of the IG 4 can be configured.
Example: ip show
ip show "WAN 2"
ip show config
ip set "WAN 2" ip 211.183.5.163 netmask
255.255.255.224 gateway 211.183.5.1
ntpd
Using this command, the NTP server can be configured. This allows the IG 4 to
synchronize its time with this configured NTP server.
The NTP server is enabled automatically when the IP address is set using the
set keyword.
netpx_conf
This command allows you to configure a port forwarding service which can be
useful if you want to allow upstream access to downstream services.
For example, there may be a downstream host running an FTP service that
needs to be accessible to upstream users. But because the downstream
network might be a private network that is not visible to the upstream, there
will be no way for the upstream user to connect to the FTP service. For a
downstream private network, upstream users will only see the WAN IP of the
IG 4 and not the individual downstream hosts. Port forwarding allows you to
assign a Port Number on the IG 4 gateway's WAN interface so that a user
connecting to the IG 4 gateway's WAN IP + Port Number will actually have their
traffic forwarded to the downstream service.
To setup the net proxy, you will need to perform the following steps:
2. Create the proxy entries – Configure the entries for the hosts which
require the proxy service.
Note: When specifying an IP address for the source network snet, you may
use CIDR format (e.g. 192.168.123.50/24 where “/24” is the subnet mask
prefix).
Variables Description
proxy_device The interface on which to listen for incoming
connections (Do not modify)
tcp_timeout Timeout (in seconds) for TCP connection
attempts.
udp_timeout Timeout (in seconds) for UDP connection
attempts.
Max TCP Connections Maximum number of TCP connections allowed.
Max UDP Connections Maximum number of UDP connections allowed.
filter_action The action applied on receipt of an incoming
connection attempt.
The above command lists the current active TCP net proxy sessions.
The above command lists the rules applied to TCP proxy connections.
The first of the two above commands adds an entry to listen for incoming TCP
connections on port 92 and forward them to the host with IP address
10.68.12.24 on port 23 (telnet) which can be found on the network
accessible through interface eth1. The second command deletes the entry just
created.
The above command clears all UDP connections entries currently applied.
Filter 1:
Action : ACCEPT
Source Network : 123.123.123.0/24
Source Port : ANY
Target Port : ANY
Filter 2:
Action : ACCEPT
Source Network : 10.12.10.1
Source Port : 30
Target Port : 20
To add a filter to the sample list above you may formulate a command such as
the one below:
The above command inserts the filter before Filter 2. Using the sample output
above, the list of filters can be thought of as an array with position index 0
occupied by Filter 1 and position index 1 occupied by Filter 2. As such, the
above command will insert the filter before Filter 2, pushing Filter 2 to position
index 2 and automatically renamed to Filter 3. If you wish to use insert after
the position, use the append command instead.
Note: While the system allows you to specify the source port, because most
outgoing connections use ephemeral ports, it is more common to set the source
port to ANY indicating that all connection attempts from 10.10.1.1 regardless
of its source port will match this filter.
The command above appends a DENY filter rule for 10.10.1.1 from source ANY
to destination port 60 after position 2 (inserted at position 3)
The command above deletes the TCP filter entry at position index 1.
syslog
Using this command, remote logging of certain system events to a specified
syslog server can be configured.
The remote syslog machine must be configured to accept logs through email
delivery.
Enable/Disable Options
Server Enable/disable remote logging.
webpx
Using this command, the IG 4 can be configured to use either a direct
connection or specify a web proxy. A comma-separated list of valid proxies and
associated ports can be specified. Also, you can set the contact email address
presented to the user when a proxy error occurs.
Enable/Disable Options
proxy Enable/disable use of parent proxy.
system_email Enable/disable use of system administrator’s
email (in place of Webmaster’s email).
websv
Using this command, parameters for the web server can be configured.
Enable/Disable Options
system_email Enable/disable use of system administrator’s
email (in place of Webmaster’s email).
webadm
Using this command, the administrator’s account details such as user id, email
address and password for the web admin can be configured.
wadacc
Restrictions on which IP addresses can have access to the web admin can be
setup here.
Enable/Disable Options
deny_downstream Enable/disable access from downstream.
ip_control Enable/disable upstream IP access control list.
enasup
The IG 4 features 2 levels of CLI access; operator mode and supervisor mode.
Commands available in the operator mode are a subset of those available in
the supervisor mode.
This command enables the user to enter into the supervisor mode. After
entering the command, a prompt for a password will appear. The default
password is blank.
Usage: enasup
passwd_sup
This command changes the supervisor password. After entering the command,
it prompts you for the new password.
Usage: passwd_sup
status
This command displays information about the current system status.
Example:
status show
Appliance Status
----------------
Disk Availability : 544169 MB
Disk Used : 2593 MB
Memory Availability: 16199 MB
NIC : eth1:58021 RX 17559 TX
CON : unknown
Version : Antlabs SG4 model 4300 release 4.1.0
IP Address : 192.168.1.243
Netmask : 255.255.255.0
DNS : 8.8.8.8,8.8.4.4
Uptime : 2:47
sessions
This command displays the real-time information about the currently logged in
sessions.
Example:
sessions show
Number #38
-----------------
Start Time : 2014-07-07 13:06:21
Stop Time : 1970-01-01 07:30:00
Service Type : fixed_duration
Status : active
Userid : qvies7 1
Hardware Address: C8:0A:A9:8B:FC:E5
IP Address : 1.2.3.1
IFIndex : 12
PPLI : eth0
show
This command acts as a wrapper for displaying the configurations of all the
commands listed above.
usage_log
This command displays a device information and usage log of downstream
users.
users
This command displays information about currently active downstream users.
SYSTEM COMMANDS
help
Displays the list of supported commands and provides a description for each
command.
reboot
This command is used to reboot the IG 4. You will be prompted to confirm the
action.
Usage: reboot
shutdown
This command is used to shut down the IG 4. You will be prompted to confirm
the action.
Usage: shutdown
restart
Use this command to restart any service when troubleshooting.
sshtun
In some network configurations, the IG 4 may reside in an internal scope and
therefore may be assigned a private IP address. In such a case, Internet bound
traffic originating from the IG 4 (and other clients from the internal scope) is
most likely Network Address Translated onto the Internet. In such a scenario,
an external host which may need to access the IG 4 from the Internet will not
be able to do so.
This command uses the port forwarding feature of SSH to create a tunnel from
the IG 4 (SSH client) to the external host (SSH server) so that the external
host’s applications can subsequently communicate with the IG 4 through the
tunnel.
The above command specifies that port 5468 on the remote host 123.44.55.66
is to be forwarded to port 1842 on the IG 4. Once executed, applications on
the remote host can access the IG 4 gateway's HTTPS by connecting to port
5468 on the remote host.
check
This command checks on the status of the httpd and squid daemon processes
and then restarts them if they are not active currently or abnormally
terminated.
This command also checks, repairs and optimizes all the mysql database tables.
It can be invoked occasionally to optimize the database performance.
Usage: exit
save_snapshot
Use this command to save a snapshot of the current state of the IG 4. Upon
executing this command, the IG 4 will reboot to save the snapshot.
restore_firmware
Use this command to restore the IG 4 to its factory default state. Upon
executing this command, the IG 4 will reboot to perform the restoration.
Usage: restore_firmware
restore_snapshot
Use this command to restore the IG 4 to the previously saved snapshot. Upon
executing this command, the IG 4 will reboot to perform the restoration. If a
snapshot is not found, no changes will be made on the IG 4.
Usage: restore_snapshot
Listed below are the additional commands that are accessible via the interface.
Supervisor-Only commands are only available in supervisor mode. Operator
commands are available in both operator and supervisor mode.
Supervisor Only
Command Description
arp Manipulate the system ARP cache
chmod Change file access permissions
cp Copy files
edit Open a text editor
ln Make links between files
mailq List pending mails in the mail queue
menu Configure the system through a menu-based interface
mkdir Make new directories
mv Move (rename) files
passwd Change CLI operator password
rm Remove files or directories
rmdir Remove empty directories
touch Change file timestamps