1、4网康产品命令行解说NSICG CLI 参考手册北京网康科技有限公司目 录一、连接到CLI 31. Console访问CLI 32. SSH访问CLI 3二、命令详解 41. help 42. icg_status 53. icg_http_ctl 54. icg_if_cfg 65. icg_ip_cfg 66. icg_dns_cfg 77. icg_route 88. icg_arp 99. icg_monitor_ports 1010. icg_sys_diagnose 1011. icg_sys_tune 1312. diagnose_network 1413. icg _db_ba
2、ckup 1514. softbypass 1515. reset 1716. update_pwd_reset 1717. upgrade 1818. passwd 1819. nslookup 1820. ping 1921. curl 2022. traceroute 2023. reboot 2024. Poweroff 2125. Exit 21一、 连接到CLI1.Console访问CLI用console线将计算机和NSICG设备相连,通过超级终端进入到CLI,超级终端设置如下:2.SSH访问CLI NSICG默认是开放22端口的,可采用SSH软件登陆到NSICG的CLI:二、命令
3、详解1. help此命令用于查看NSICG console口模式下可用的命令。语法模式:Help例子:NS-ICG-help* Netentsec Internet Control Gateway Console* help - list available commands * icg_status - show icg status * icg_http_ctl - turn http engine on/off * icg_if_cfg - config in/out interface * icg_ip_cfg - config ip address * icg_dns_cfg - c
4、onfig dns address * icg_route - config static route * icg_arp - config static arp item * icg_monitor_ports - config engine monitor ports * icg_sys_diagnose - diagnose system and collect * the infomation * icg_sys_tune - tune system parameter * diagnose_network - diagnose web access problem * icg_db_
5、backup - backup and restore database * softbypass - set icg softbypass parameter * reset - reset system to factory mode * update_pwd_reset - reset the password of liveu- * * pdate system * upgrade - icg system upgrade * passwd - modify current user password * nslookup - query the DNS for resource *
6、records * ping - ping ip address * curl - transfer a URL * traceroute - print the route packets take * to network host * reboot - reboot the system * poweroff - turn off the system * exit - exit from the login *2. icg_status这个命令用于查看icg网关当前的运行状态,包括运行模式,内外网口信息,IP配置信息和引擎工作状态。语法模式:icg_status例子:NS-ICG-ic
7、g_status- Internet Control Gateway System, Netentsec Inc. -* Network mode: Bridge-* External If: eth0 ; Internal If: eth1-* IP Configuration: 192.168.10.23/255.255.255.0-* Default Gateway:192.168.10.1-* DNS: 202.106.46.151; 202.116.46.151;-* ICG Engine Status: ICG Engine is not exist!-* Http Engine
8、Status: On-* Email Engine Status: Email Engine is not exist!-* Cache Status: On-3. icg_http_ctl 此命令用于开启,停止或重启过滤引擎。语法模式:icg_http_ctl start|stop|restart|help命令参数描述start开启http引擎stop关闭http引擎restart重启http引擎help命令帮助例子:NS-ICG-icg_http_ctl stopHttp Engine stop action succeeded.NS-ICG-icg_http_ctl restartHtt
9、p Engine is off now, please start Http Engine first.NS-ICG-icg_http_ctl startStarting Http Engine now, please wait a minute.NS-ICG-icg_http_ctl restartHttp Engine is restarting, please wait a minute.4. icg_if_cfg 此命令用于指定NSICG工作的输入输出接口。语法模式:icg_if_cfg例子:NS-ICG-icg_if_cfgCurrent Config: External Inter
10、face: eth0 Internal Interface: eth1Available Interface: 0:eth0; 1:eth1; Please choose external infterface 0|1: 0 External Interface: eth0Please choose internal infterface 0|1: 1 Internal Interface: eth1 Need reboot system, make change take effect!NS-ICG-reboot5. icg_ip_cfg 此命令用于配置NSICG工作的模式和IP地址信息。语
11、法模式:icg_ip_cfg例子:.NS-ICG-icg_ip_cfgCurrent Configuration: Network mode: Bridge IP Configuration: 192.168.10.23/255.255.255.0 Default Gateway: 192.168.10.1-Please choose network mode Bridge/Gateway:b(网桥模式)New network mode is: BridgePlease input Bridge IP: 192.168.10.24Bridge IP: 192.168.10.24Please i
12、nput Bridge Netmask: 255.255.255.0Bridge Netmask: 255.255.255.0Please input default gateway IP: 192.168.10.1Default Gateway: 192.168.10.1NS-ICG-icg_ip_cfgCurrent Configuration: Network mode: Bridge IP Configuration: 192.168.10.23/255.255.255.0 Default Gateway: 192.168.10.1-.Please choose network mod
13、e Bridge/Gateway:g(网关模式)New network mode is: GatewayPlease input External IP: 192.168.10.23External IP: 192.168.10.23Please input External IP Netmask: 255.255.255.0External IP Netmask: 255.255.255.0Please input Internal IP: 172.16.10.1Internal IP: 172.16.10.1Please input Internal IP Netmask: 255.255
14、.255.0Internal IP Netmask: 255.255.255.0Please input default gateway IP: 192.168.10.1Default Gateway: 192.168.10.16. icg_dns_cfg 此命令用于配置NSICG的DNS服务器。语法模式:icg_dns_cfg例子:NS-ICG-icg_dns_cfgCurrent Configuration: Name Server 1: 202.106.46.151-Please input Name Server 1: 202.116.46.151 Name Server 1: 202
15、.116.46.151Please input Name Server 2: 202.106.46.151 Name Server 2: 202.106.46.151NS-ICG-7. icg_route 此命令用于配置NSICG的路由表。语法模式:icg_route例子:NS-ICG-icg_route= ICG IP routing table=Destination Gateway Iface192.168.196.0/24 0.0.0.0 bri00.0.0.0/0 192.168.196.254 bri0=1) add; 2) delete; 3) exit; Input Chois
16、e:1 (添加路由信息)Destination (ipaddr/masklen):192.168.1.0/24Nexthop (Gateway):192.168.196.254Interface:bri0Adding new route success!sed: -e expression #1, char 28: unknown command: 2= ICG IP routing table=Destination Gateway Iface192.168.196.0/24 0.0.0.0 bri0192.168.1.0/24 192.168.196.254 bri00.0.0.0/0 1
17、92.168.196.254 bri0=1) add; 2) delete; 3) exit; Input Choise:2(删除一条路由信息)Destination (ipaddr/masklen):192.168.1.0/24Deleting route success!= ICG IP routing table=Destination Gateway Iface192.168.196.0/24 0.0.0.0 bri00.0.0.0/0 192.168.196.254 bri0=1) add; 2) delete; 3) exit; Input Choise:3(退出)8. icg_a
18、rp此命令用于配置静态的ARP表语法模式:icg_arp例子:NS-ICG-icg_arp= ICG ARP table=192.168.196.254 00:10:F3:0B:E9:8F dynamic bri0 192.168.196.127 00:18:8B:C5:EC:D2 dynamic bri0 192.168.196.232 00:90:27:75:01:4E static bri0 =1) add; 2) delete; 3) exit; Input Choise:1(添加一条静态ARP信息)IPADDR:192.168.196.127MAC:00:18:8B:C5:EC:D2
19、Adding arp map success!= ICG ARP table=192.168.196.254 00:10:F3:0B:E9:8F dynamic bri0 192.168.196.232 00:90:27:75:01:4E static bri0 192.168.196.127 00:18:8B:C5:EC:D2 static bri0 =1) add; 2) delete; 3) exit; Input Choise:2(删除一条ARP信息)IPADDR:192.168.196.232Deleting arp item success!= ICG ARP table=192.
20、168.196.254 00:10:F3:0B:E9:8F dynamic bri0 192.168.196.127 00:18:8B:C5:EC:D2 static bri0 =1) add; 2) delete; 3) exit; Input Choise:3(退出)注释:在个别情况下,ICG设备有可能无法学习到网关的mac地址,需要手工添加静态arp表项。icg_arp命令只对由该命令添加的arp表项可以删除,对于通过其他方式(如直接用arp命令添加的静态arp映射)不能删除;9. icg_monitor_ports此命令用于修改NSICG引擎监视的端口。语法模式:icg_monitor
21、_ports例子:NS-ICG-icg_monitor_ports=Current ICG monitor on ports: 80=Please input New http monitor portsPORTS separated with comma(such as: 80,808,1080):80,808,1080=Current ICG monitor on ports: 80,808,1080注释: 执行完这条命令后,需要重新启动一下引擎,设备才能生效。10. icg_sys_diagnose此命令用于系统故障诊断并收集相关信息,以便发送网康公司进行测试、分析故障原因,并最终为客户
22、解决相关问题。(此命令使用对话模式,如果您的网络出现故障,请用此调试命令)语法模式:icg_sys_diagnose例子:NS-ICG-icg_sys_diagnoseChecking System Basic Status . Memory Used:95% Disk Partition #1 Used:21% Disk Partition #2 Used:2% CPU Idle:96.2% OS Version:NSOS 3000 Product Version:4.3.0.5113Checking System Service Status . Web Admin Homepage:OK
23、 Database Service:OK Web Filter Service:OK Web User Login Service:OK NT User Login Service:DISABLE Web Cache Service:OK DNS Service:OKChecking Network Configuration . Probe IP Address: IP #0:192.168.196.232/24 Probe VLAN Info:N/A Probe Gateway:192.168.196.254Dumping Policy Data .OKDumping System Log
24、 . Compressing System Log:OK Compressing Web Filter Log:OK Do You Have Problems With Your Network ? (yes/no) yFinding Problems Of Your Network . Connecting Loopback:OK Connecting Gateway:OK Please Provide An IP On Your Local Net (Press Enter To Skip) 192.168.196.254 Connecting Local IP:OK Please Provide A Domain Name On Internet (Default: ) Resolving Domain Name:OK* domain ip : 210.51.189.25 * Connecting The Domain:OK Getting Hom
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1