Little bit of Excel knowledge is a must thing :
I ran into an issue recently, got mail with all comments not in the right position. Following code snippet helped to survive
ATL+F7 took me to vba
Pasted the following and ran this :-
Sub ResetComments()
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.Top = cmt.Parent.Top + 5
cmt.Shape.Left = _
cmt.Parent.Offset(0, 1).Left + 5
Next
End Sub
And ofcoz Review tab helped me to hide them later :)
Wednesday, August 21, 2013
Understanding BIOS keywords - Dmidecode
dmidecode --type {KEYWORD / Number }
You need to pass dmidecode following keywords:- bios
- system
- baseboard
- chassis
- processor
- memory
- cache
- connector
- slot
| # Type | Short Description |
| 0 | BIOS |
| 1 | System |
| 2 | Base Board |
| 3 | Chassis |
| 4 | Processor |
| 5 | Memory Controller |
| 6 | Memory Module |
| 7 | Cache |
| 8 | Port Connector |
| 9 | System Slots |
| 10 | On Board Devices |
| 11 | OEM Strings |
| 12 | System Configuration Options |
| 13 | BIOS Language |
| 14 | Group Associations |
| 15 | System Event Log |
| 16 | Physical Memory Array |
| 17 | Memory Device |
| 18 | 32-bit Memory Error |
| 19 | Memory Array Mapped Address |
| 20 | Memory Device Mapped Address |
| 21 | Built-in Pointing Device |
| 22 | Portable Battery |
| 23 | System Reset |
| 24 | Hardware Security |
| 25 | System Power Controls |
| 26 | Voltage Probe |
| 27 | Cooling Device |
| 28 | Temperature Probe |
| 29 | Electrical Current Probe |
| 30 | Out-of-band Remote Access |
| 31 | Boot Integrity Services |
| 32 | System Boot |
| 33 | 64-bit Memory Error |
| 34 | Management Device |
| 35 | Management Device Component |
| 36 | Management Device Threshold Data |
| 37 | Memory Channel |
| 38 | IPMI Device |
| 39 | Power Supply |
# dmidecode --type 39Display CPU information, enter:
# dmidecode --type processorRead man page for more information:
$ man dmidecodeI see this not working in SPLAT with type switch
Monday, August 19, 2013
BIGIP F5 Command Line (bigpipe Vs tmsh)
BIGIP F5 Command Line (bigpipe Vs tmsh)
| b arp show | show /net arp all | |
| b arp all delete | tmsh delete /net arp all | |
| b class DATA-GROUP mode read | modify ltm data-group DATA-GROUP access-mode read-only | |
| b class show | show running-config /ltm data-group | |
| b cluster show | show /sys cluster all-properties | |
| b config load file.ucs | load /sys ucs file.ucs | |
| b config save file.ucs | save /sys ucs file.ucs | |
| b config sync | run /cm config-sync from-group/to-group DEVICEGROUPNAME | |
| b conn show | show /sys connection | |
| b conn show all | show /sys connection all-properties | Show all connection table properties |
| b conn ss server node-ip:node-port delete | delete /sys connection ss-server-addr node-ip ss-server-port node-port | Delete connection table entries for node-ip node-port |
| b daemon list | list /sys daemon-ha all-properties | |
| b db < key name > < value > | modify /sys db < key name > value < value > | Modify database values |
| b db Platform.PowerSupplyMonitor disable | tmsh modify sys db platform.powersupplymonitor value disable | Disables PSU alert if only one PSU in use on Dual PSU system |
| b db show | show running-config /sys db -hidden all-properties | |
| b export my.config.scf | save /sys scf my.config.scf | v10.x only |
| b export my.config.scf | save /sys config file my.config.scf tar-file my.config.tar | v11.0+ |
| b failover standby | run /sys failover standby | v11+ |
| b fo show | show /sys failover | |
| b fo standby | run /util bigpipe fo standby | v10+ |
| b ha table | show /sys ha-status all-properties | |
| b hardware baud rate | modify /sys console baud-rate | v10: sol10621 | v11: sol13325 |
| b ha table show | show /sys ha-status all-properties | |
| b httpd list | list /sys httpd | To list httpd configuration. |
| b import my.config.scf | load /sys scf my.config.scf | v10.x only |
| b import my.config.scf | load /sys config file my.config.scf tar-file my.config.tar | v11.0+ |
| b interface show -j | show /net interface -hidden all-properties | -hidden is not tab completable, but should be shown in the command output on iHealth. |
| b load | load sys config partitions all | |
| b merge | load /sys config merge | Added in v11. In v10 use bigpipe |
| b merge /path/to/file.txt | tmsh load /sys config file /path/to/file.txt merge | Merge a file into the BIG-IP configuration. Added in v11. In v10, use bigpipe |
| b mgmt show | show running-config /sys management-ip | |
| b monitor show | show running-config /ltm monitor (?) | |
| b nat show | show /ltm nat all or list /ltm nat all-properties | The two tmsh commands are required here since b nat show will list the unit preference and ARP status. Statistical information is shown via “show” while configuration information is shown via “list”. |
| b node all monitor show | list ltm node monitor | |
| b node show | show /ltm node | |
| b ntp servers 10.10.10.10 | modify sys ntp servers add { 10.10.10.10 } | |
| b packet filter all show | show /net packet-fliter | |
| b partition | list auth partition | no “show” command yet, list will only show written partitions |
| b persist | tmsh show ltm persistence persist-records | |
| b platform | show /sys hardware | |
| b pool list | list /ltm pool | |
| b pool show | show /ltm pool members | |
| b profile access all stats | ||
| b profile auth all show all | show /ltm auth profile all | The tmsh auth command does not display associated OCSP information shown by bigpipe. |
| b profile http ramcache show | show /ltm profile http | |
| b profile http stats | show /ltm profile http | |
| b profile ssl stats | show /ltm profile ssl | |
| b profile persist profile_name list all | tmsh list ltm persistence profile_name all-properties | |
| b profile tcp show | show /ltm profile tcp | |
| b profile tcp stats | show /ltm profile tcp | |
| b profile udp show | show /ltm profile udp | |
| b profile udp stats | show /ltm profile udp | |
| b profile xml show | show /ltm profile xml | |
| b reset | load / sys default-config | v10.x |
| b reset | load / sys config default | v11.x |
| b route show | show /net route all | |
| b rule < rule > show all | show /ltm rule < rule > | |
| b rule show | show /ltm rule all | |
| b rule stats reset | reset-stats /ltm rule < rule > | |
| b save | save sys config partitions all | |
| b self show | show running-config /net self | |
| b snat | show /ltm snat | |
| b snatpool show | show /ltm snatpool | |
| b software | show sys software | |
| b software desired | install sys software image NAME volume HDX.Y reboot | |
| b software desired | install sys software image NAME create-volume volume HDX.Y | v11.0+ : Creates volume and installs software. (Cannot create empty volumes in v11) |
| b software desired | install sys software hotfix NAME volume HDX.Y | Installs desired Hotfix to the specified Volume. |
| b stp show | show running-config /net stp all-properties | |
| b syslog list all | list sys syslog all-properties | |
| b syslog remote server none | modify sys syslog remote-servers none | |
| b syslog remote server test-srv host 192.168.206.47 | modify sys syslog remote-servers add {test-srv{host 192.168.206.47}} | You can append “remote-port 517″ for example to the end of the command to specify the port |
| b syslog remote server test-srv local ip 172.28.72.90 | modify sys syslog remote-servers modify {test-srv{local-ip 172.28.72.90}} | The self ip must be non-floating |
| b system hostname | modify sys global-settings hostname NEWHOST.EXAMPLE.COM | |
| b trunk show -j | show /net trunk -hidden all | |
| b trunk all lacp show | show /net trunk detail | |
| b unit show | ||
| b verify load | load sys config verify | |
| b version | show /sys version | Takes grep (but not “head” as in “b version |head”) – for example, grep on build: tmsh show sys version |grep -i build |
| b virtual address show | show /ltm virtual-address all-properties | “show” does not show the objects used by the virtual, and list does not show statistics. |
| b virtual all show all | show /ltm virtual all-properties or list /ltm virtual all-properties | “show” does not show the objects used by the virtual, and list does not show statistics. |
| b vlan all show all -j | show /net vlan -hidden | |
| b vlangroup all show all | show /net vlan-group all | |
| bigstart status|start|stop|restart SERVICE_NAME | show|start|stop|restart sys service SERVICE_NAME | |
| bpsh (?) | load sys config from-terminal merge |
Wednesday, July 3, 2013
Cisco ASA : Traffic Flow
It is always a mystery that we call ASA as a full time Enterprise Firewall. Well, may be in Paper :)
This was always been in my mind, What is the traffic flow in ASA? And it has been sometime this question haunting me,
Here is my Answer,
1. Check For Existing Connection (Cisco call it as ASA, LOL we know who invented it.)
2. Dest NAT
3. ACL
4. uAuth (Cut Thru proxy)
5. Source NAT
6. Encrypt (VPN)
7. RPF
8. VPN Flow
9. NAT (Host Limits : I need to put some lights here,Seems to be Connection, Embryonic limit)
10. Flow Creation
And Traffic leaves ASA
I made 4.2.2.2 as https server, just took that IP as I am familiar with that IP ;)
Evidence
@@@@
FW(config)# packet-tracer input inside tcp 172.16.1.xxx 1025 4.2.2.2 443
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
static (outside,inside) 4.2.2.2 72.163.4.161 netmask 255.255.255.255
match ip outside host 72.163.4.161 inside any
static translation to 4.2.2.2
translate_hits = 0, untranslate_hits = 1
Additional Information:
NAT divert to egress interface outside
Untranslate 4.2.2.2/0 to 72.163.4.161/0 using netmask 255.255.255.255
Phase: 2
Type: ACCESS-LIST
Subtype: log
Result: ALLOW
Config:
access-group acl_inside in interface inside
access-list acl_inside extended permit ip any any
Additional Information:
Phase: 3
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 4
Type: AAA
Subtype: aaa-auth
Result: ALLOW
Config:
Additional Information:
Phase: 5
Type: NAT
Subtype:
Result: ALLOW
Config:
nat (inside) 1 172.16.1.xxx 255.255.255.0
match ip inside 172.16.1.xxx 255.255.255.0 outside any
dynamic translation to pool 1 (60.15.22.xxx [Interface PAT])
translate_hits = 77423, untranslate_hits = 376
Additional Information:
Dynamic translate 172.16.1.101/1024 to 60.15.22.xxx/11278 using netmask 255.255.255.255
Phase: 6
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
nat (inside) 1 172.16.1.xxx 255.255.255.0
match ip inside 172.16.1.xxx 255.255.255.0 outside any
dynamic translation to pool 1 (60.15.22.xxx [Interface PAT])
translate_hits = 77423, untranslate_hits = 376
Additional Information:
Phase: 7
Type: VPN
Subtype: encrypt
Result: ALLOW
Config:
Additional Information:
Phase: 8
Type: NAT
Subtype: rpf-check
Result: ALLOW
Config:
static (outside,inside) 4.2.2.2 72.163.4.161 netmask 255.255.255.255
match ip outside host 72.163.4.161 inside any
static translation to 4.2.2.2
translate_hits = 0, untranslate_hits = 1
Additional Information:
Phase: 9
Type: VPN
Subtype: ipsec-tunnel-flow
Result: ALLOW
Config:
Additional Information:
Phase: 10
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
static (outside,inside) 4.2.2.2 72.163.4.161 netmask 255.255.255.255
match ip outside host 72.163.4.161 inside any
static translation to 4.2.2.2
translate_hits = 0, untranslate_hits = 1
Additional Information:
Phase: 11
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 12
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 80156, packet dispatched to next module
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
VPN Without NAT (IP are Diff)
======================
`FW(config)# packet-tracer input inside tcp 172.16.1.xxx 1025 4.2.2.2 443
Phase: 1
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 0.0.0.0 0.0.0.0 outside
Phase: 2
Type: ACCESS-LIST
Subtype: log
Result: ALLOW
Config:
access-group acl_inside in interface inside
access-list acl_inside extended permit ip any any
Additional Information:
Phase: 3
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 4
Type: AAA
Subtype: aaa-auth
Result: ALLOW
Config:
Additional Information:
Phase: 5
Type: NAT
Subtype:
Result: ALLOW
Config:
nat (inside) 1 172.16.1.0 255.255.255.0
match ip inside 172.16.1.0 255.255.255.0 outside any
dynamic translation to pool 1 (68.15.22.xxx [Interface PAT])
translate_hits = 77311, untranslate_hits = 373
Additional Information:
Dynamic translate 172.16.1.xxx/1024 to 68.15.22.xxx/65412 using netmask 255.255.255.255
Phase: 6
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
nat (inside) 1 172.16.1.0 255.255.255.0
match ip inside 172.16.1.0 255.255.255.0 outside any
dynamic translation to pool 1 (68.15.22.xxx [Interface PAT])
translate_hits = 77311, untranslate_hits = 373
Additional Information:
Phase: 7
Type: VPN
Subtype: encrypt
Result: ALLOW
Config:
Additional Information:
Phase: 8
Type: VPN
Subtype: ipsec-tunnel-flow
Result: ALLOW
Config:
Additional Information:
Phase: 9
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 10
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 80024, packet dispatched to next module
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
I had this in my notes, I commented it now between 1 & 2 :)
Packet Flow Sequence
====================
PIX/ASA - Inside (Higher Sec_Lev) to Outside (Lower SEC_Level)
---------------------------------------------------------------
Eg. Type - [Sub-Type] - Description
1. FLOW-LOOKUP - [] - Check for existing connections, if none found create a new connection.
2. ROUTE-LOOKUP - [input] - Initial Checking (Reverse Path Check, etc.)
Comment : I believe DST nat should happen here so it it will match the ACL, this is proved in above example
3. ACCESS-LIST - [log] - ACL Lookup
4. CONN-SETTINGS - [] - class-map, policy-map, service-policy
5. IP-OPTIONS - [] -
6. NAT - [] - xlate
7. NAT - [host-limits] -
8. IP-OPTIONS - [] -
9. FLOW-CREATION - [] - If everything passes up until this point a connection is created.
10. ROUTE-LOOKUP - [output and adjacency]
This was always been in my mind, What is the traffic flow in ASA? And it has been sometime this question haunting me,
Here is my Answer,
With VPN
and Static NAT
@@@@@@@@@@ 1. Check For Existing Connection (Cisco call it as ASA, LOL we know who invented it.)
2. Dest NAT
3. ACL
4. uAuth (Cut Thru proxy)
5. Source NAT
6. Encrypt (VPN)
7. RPF
8. VPN Flow
9. NAT (Host Limits : I need to put some lights here,Seems to be Connection, Embryonic limit)
10. Flow Creation
And Traffic leaves ASA
I made 4.2.2.2 as https server, just took that IP as I am familiar with that IP ;)
Evidence
@@@@
FW(config)# packet-tracer input inside tcp 172.16.1.xxx 1025 4.2.2.2 443
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
static (outside,inside) 4.2.2.2 72.163.4.161 netmask 255.255.255.255
match ip outside host 72.163.4.161 inside any
static translation to 4.2.2.2
translate_hits = 0, untranslate_hits = 1
Additional Information:
NAT divert to egress interface outside
Untranslate 4.2.2.2/0 to 72.163.4.161/0 using netmask 255.255.255.255
Phase: 2
Type: ACCESS-LIST
Subtype: log
Result: ALLOW
Config:
access-group acl_inside in interface inside
access-list acl_inside extended permit ip any any
Additional Information:
Phase: 3
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 4
Type: AAA
Subtype: aaa-auth
Result: ALLOW
Config:
Additional Information:
Phase: 5
Type: NAT
Subtype:
Result: ALLOW
Config:
nat (inside) 1 172.16.1.xxx 255.255.255.0
match ip inside 172.16.1.xxx 255.255.255.0 outside any
dynamic translation to pool 1 (60.15.22.xxx [Interface PAT])
translate_hits = 77423, untranslate_hits = 376
Additional Information:
Dynamic translate 172.16.1.101/1024 to 60.15.22.xxx/11278 using netmask 255.255.255.255
Phase: 6
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
nat (inside) 1 172.16.1.xxx 255.255.255.0
match ip inside 172.16.1.xxx 255.255.255.0 outside any
dynamic translation to pool 1 (60.15.22.xxx [Interface PAT])
translate_hits = 77423, untranslate_hits = 376
Additional Information:
Phase: 7
Type: VPN
Subtype: encrypt
Result: ALLOW
Config:
Additional Information:
Phase: 8
Type: NAT
Subtype: rpf-check
Result: ALLOW
Config:
static (outside,inside) 4.2.2.2 72.163.4.161 netmask 255.255.255.255
match ip outside host 72.163.4.161 inside any
static translation to 4.2.2.2
translate_hits = 0, untranslate_hits = 1
Additional Information:
Phase: 9
Type: VPN
Subtype: ipsec-tunnel-flow
Result: ALLOW
Config:
Additional Information:
Phase: 10
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
static (outside,inside) 4.2.2.2 72.163.4.161 netmask 255.255.255.255
match ip outside host 72.163.4.161 inside any
static translation to 4.2.2.2
translate_hits = 0, untranslate_hits = 1
Additional Information:
Phase: 11
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 12
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 80156, packet dispatched to next module
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
VPN Without NAT (IP are Diff)
======================
`FW(config)# packet-tracer input inside tcp 172.16.1.xxx 1025 4.2.2.2 443
Phase: 1
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 0.0.0.0 0.0.0.0 outside
Phase: 2
Type: ACCESS-LIST
Subtype: log
Result: ALLOW
Config:
access-group acl_inside in interface inside
access-list acl_inside extended permit ip any any
Additional Information:
Phase: 3
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 4
Type: AAA
Subtype: aaa-auth
Result: ALLOW
Config:
Additional Information:
Phase: 5
Type: NAT
Subtype:
Result: ALLOW
Config:
nat (inside) 1 172.16.1.0 255.255.255.0
match ip inside 172.16.1.0 255.255.255.0 outside any
dynamic translation to pool 1 (68.15.22.xxx [Interface PAT])
translate_hits = 77311, untranslate_hits = 373
Additional Information:
Dynamic translate 172.16.1.xxx/1024 to 68.15.22.xxx/65412 using netmask 255.255.255.255
Phase: 6
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
nat (inside) 1 172.16.1.0 255.255.255.0
match ip inside 172.16.1.0 255.255.255.0 outside any
dynamic translation to pool 1 (68.15.22.xxx [Interface PAT])
translate_hits = 77311, untranslate_hits = 373
Additional Information:
Phase: 7
Type: VPN
Subtype: encrypt
Result: ALLOW
Config:
Additional Information:
Phase: 8
Type: VPN
Subtype: ipsec-tunnel-flow
Result: ALLOW
Config:
Additional Information:
Phase: 9
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 10
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 80024, packet dispatched to next module
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
I had this in my notes, I commented it now between 1 & 2 :)
Packet Flow Sequence
====================
PIX/ASA - Inside (Higher Sec_Lev) to Outside (Lower SEC_Level)
---------------------------------------------------------------
Eg. Type - [Sub-Type] - Description
1. FLOW-LOOKUP - [] - Check for existing connections, if none found create a new connection.
2. ROUTE-LOOKUP - [input] - Initial Checking (Reverse Path Check, etc.)
Comment : I believe DST nat should happen here so it it will match the ACL, this is proved in above example
3. ACCESS-LIST - [log] - ACL Lookup
4. CONN-SETTINGS - [] - class-map, policy-map, service-policy
5. IP-OPTIONS - [] -
6. NAT - [] - xlate
7. NAT - [host-limits] -
8. IP-OPTIONS - [] -
9. FLOW-CREATION - [] - If everything passes up until this point a connection is created.
10. ROUTE-LOOKUP - [output and adjacency]
Wednesday, June 26, 2013
How to delete IP Address from a Nokia IPSO interface when VRRP enabled on the Interface :
#Check the mode if it is monitored:
dbget -rv ipsrd:instance:default:vrrp:interface:eth-s1p3c0
#Remove interface from vrrp monitoring:
dbset ipsrd:instance:default:vrrp:interface:eth-s1p3c0:mode
#Delete the interface IP Address
clish -c "delete interface eth-s1p3c0 address 192.168.150.5"
#Save the configs
dbset save
#Check the mode if it is monitored:
dbget -rv ipsrd:instance:default:vrrp:interface:eth-s1p3c0
#Remove interface from vrrp monitoring:
dbset ipsrd:instance:default:vrrp:interface:eth-s1p3c0:mode
#Delete the interface IP Address
clish -c "delete interface eth-s1p3c0 address 192.168.150.5"
#Save the configs
dbset save
Thursday, May 30, 2013
Check Point : Provider-1 / Smart Center Sever - Connected Admins
After a long time, I got something to post; Something which I lost in-transit...
How to check any connected admins from CLI of a Provider-1 or a SmartCenter Server
It is very simple,
Provider-1
==========
[Expert@Provider-1]# mdsenv 192.168.1.100
[Expert@Provider-1]# cpstat mg
Product Name: Check Point SmartCenter Server
Major version: 6
Minor version: 0
Build number: 730640034
Is started: 1
Active status: active
Status: OK
Connected clients
----------------------------------------------------------
|Client type |Administrator|Host |Database lock|
----------------------------------------------------------
|SmartDashboard|admin |TRE-3SPENCERA|false |
----------------------------------------------------------
Smart Center Server
==================
[Expert@SCS]# cpstat mg
Product Name: Check Point SmartCenter Server
Major version: 6
Minor version: 0
Build number: 730640034
Is started: 1
Active status: active
Status: OK
Connected clients
----------------------------------------------------------
|Client type |Administrator|Host |Database lock|
----------------------------------------------------------
|SmartDashboard|admin |TRE-3SPENCERA|false |
----------------------------------------------------------
How to check any connected admins from CLI of a Provider-1 or a SmartCenter Server
It is very simple,
Provider-1
==========
[Expert@Provider-1]# mdsenv 192.168.1.100
[Expert@Provider-1]# cpstat mg
Product Name: Check Point SmartCenter Server
Major version: 6
Minor version: 0
Build number: 730640034
Is started: 1
Active status: active
Status: OK
Connected clients
----------------------------------------------------------
|Client type |Administrator|Host |Database lock|
----------------------------------------------------------
|SmartDashboard|admin |TRE-3SPENCERA|false |
----------------------------------------------------------
Smart Center Server
==================
[Expert@SCS]# cpstat mg
Product Name: Check Point SmartCenter Server
Major version: 6
Minor version: 0
Build number: 730640034
Is started: 1
Active status: active
Status: OK
Connected clients
----------------------------------------------------------
|Client type |Administrator|Host |Database lock|
----------------------------------------------------------
|SmartDashboard|admin |TRE-3SPENCERA|false |
----------------------------------------------------------
Tuesday, October 9, 2012
FTP : Syntax and Examples
List of FTP commands for the Microsoft command-line FTP client
Command-line options
As you're starting the program from a DOS prompt:ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [computer]
- -v - Suppresses verbose display of remote server responses.
- -n - Suppresses auto-login upon initial connection.
- -i - Turns off interactive prompting during multiple file transfers.
- -d - Enables debugging, displaying all ftp commands passed between the client and server.
- -g - Disables filename globbing, which permits the use of wildcard chracters in local file and path names.
- -s:filename - Specifies a text file containing ftp commands; the commands will automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
- -a - Use any local interface when binding data connection.
- -w:windowsize - Overrides the default transfer buffer size of 4096.
- computer - Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last parameter on the line.
Client commands
- ! - Runs the specified command on the local computer
- ? - Displays descriptions for ftp commands
- append - Appends a local file to a file on the remote computer
- ascii - Sets the file transfer type to ASCII, the default
- bell - Toggles a bell to ring after each file transfer command is completed (default = OFF)
- binary - Sets the file transfer type to binary
- bye - Ends the FTP session and exits ftp
- cd - Changes the working directory on the remote computer
- close - Ends the FTP session and returns to the command interpreter
- debug - Toggles debugging (default = OFF)
- delete - Deletes a single file on a remote computer
- dir - Displays a list of a remote directory's files and subdirectories
- disconnect - Disconnects from the remote computer, retaining the ftp prompt
- get - Copies a single remote file to the local computer
- glob - Toggles filename globbing (wildcard characters) (default = ON)
- hash - Toggles hash-sign (#) printing for each data block transferred (default = OFF)
- help - Displays descriptions for ftp commands
- lcd - Changes the working directory on the local computer
- literal - Sends arguments, verbatim, to the remote FTP server
- ls - Displays an abbreviated list of a remote directory's files and subdirectories
- mdelete - Deletes one or more files on a remote computer
- mdir - Displays a list of a remote directory's files and subdirectories
- mget - Copies one or more remote files to the local computer
- mkdir - Creates a remote directory
- mls - Displays an abbreviated list of a remote directory's files and subdirectories
- mput - Copies one or more local files to the remote computer
- open - Connects to the specified FTP server
- prompt - Toggles prompting (default = ON)
- put - Copies a single local file to the remote computer
- pwd - Displays the current directory on the remote computer (literally, "print working directory")
- quit - Ends the FTP session with the remote computer and exits ftp (same as "bye")
- quote - Sends arguments, verbatim, to the remote FTP server (same as "literal")
- recv - Copies a remote file to the local computer
- remotehelp - Displays help for remote commands
- rename - Renames remote files
- rmdir - Deletes a remote directory
- send - Copies a local file to the remote computer (same as "put")
- status - Displays the current status of FTP connections
- trace - Toggles packet tracing (default = OFF)
- type - Sets or displays the file transfer type (default = ASCII)
- user - Specifes a user to the remote computer
- verbose - Toggles verbose mode (default = ON)
!
Runs the specified command on the local computer. Syntax: ! [command]Parameter(s):
command - Specifies the command to run on the local computer. If command is omitted, the local command prompt is displayed; type "exit" to return to ftp.
?
Displays descriptions for ftp commands. ? is identical to help. Syntax: ? [command]Parameter(s):
command - Specifies the name of the command about which you want a description. If command is not specified, ftp displays a list of all commands.
append
Appends a local file to a file on the remote computer using the current file type setting. Syntax: append local-file [remote-file]Parameter(s):
local-file - Specifies the local file to add.
remote-file - Specifies the file on the remote computer to which local-file will be added. If remote-file is omitted, the local filename is used for the remote filename.
ascii
Sets the file transfer type to ASCII, the default. Syntax: asciiNote
FTP supports two file transfer types, ASCII and binary image. ASCII should be used when transferring text files. See also binary.
In ASCII mode, character conversions to and from the network standard character set are performed. For example, end-of-line characters are converted as necessary, based on the target operating system.
bell
Toggles a bell to ring after each file transfer command is completed. By default, the bell is off. Syntax: bellbinary
Sets the file transfer type to binary. Syntax: binaryNote
FTP supports two file transfer types, ASCII and binary image. Binary should be used when transferring executable files. In binary mode, the file is moved byte-by-byte. See also ascii.
bye
Ends the FTP session with the remote computer and exits ftp. Syntax: byecd
Changes the working directory on the remote computer. Syntax: cd remote-directoryParameter(s):
remote-directory - Specifies the directory on the remote computer to change to.
close
Ends the FTP session with the remote server and returns to the command interpreter. Syntax: closedebug
Toggles debugging. When debugging is on, each command sent to the remote computer is printed, preceded by the string --->. By default, debugging is off. Syntax: debugdelete
Deletes a single file on a remote computer. See also mdelete, which can delete multiple files. Syntax: delete remote-fileParameter(s):
remote-file - Specifies the file to delete.
dir
Displays a list of a remote directory's files and subdirectories. See also mdir, which can list multiple directories. Syntax: dir [remote-directory] [local-file]Parameter(s):
remote-directory - Specifies the directory for which you want to see a listing. If no directory is specified, the current working directory on the remote computer is used.
local-file - Specifies a local file to store the listing. If not specified, output is displayed on the screen.
disconnect
Disconnects from the remote computer, retaining the ftp prompt. Syntax: disconnectget
Copies a remote file to the local computer using the current file transfer type. See also mget, which can copy multiple files. Syntax: get remote-file [local-file]Parameter(s):
remote-file
Specifies the remote file to copy.
local-file
Specifies the name to use on the local computer. If not specified, the file is given the remote-file name.
glob
Toggles filename globbing. Globbing permits use of wildcard characters in local file or path names. By default, globbing is on. Syntax: globhash
Toggles hash-sign (#) printing for each data block transferred. The size of a data block is 2048 bytes. By default, hash mark printing is off. Syntax: hashhelp
Displays descriptions for ftp commands. Syntax: help [command]Parameter(s):
command - Specifies the name of the command about which you want a description. If command is not specified, ftp displays a list of all commands.
lcd
Changes the working directory on the local computer. By default, the working directory is the directory in which ftp was started. Syntax: lcd [directory]Parameter(s):
directory - Specifies the directory on the local computer to change to. If directory is not specified, the current working directory on the local computer is displayed.
literal
Sends arguments, verbatim, to the remote FTP server. A single FTP reply code is expected in return. Syntax: literal argument [ ...]Parameter(s):
argument - Specifies the argument to send to the FTP server.
ls
Displays an abbreviated list of a remote directory's files and subdirectories. Syntax: ls [remote-directory] [local-file]Parameter(s):
remote-directory - Specifies the directory for which you want to see a listing. If no directory is specified, the current working directory on the remote computer is used.
local-file - Specifies a local file to store the listing. If not specified, output is displayed on the screen.
mdelete
Deletes one or more files on a remote computer. Syntax: mdelete remote-files [ ...]Parameter(s):
remote-files - Specifies the remote files to delete.
mdir
Displays a list of a remote directory's files and subdirectories. Mdir allows you to specify multiple files. Syntax: mdir remote-files [ ...] local-fileParameter(s):
remote-files - Specifies the directory for which you want to see a listing. Remote-files must be specified; type "-" to use the current working directory on the remote computer.
local-file - Specifies a local file to store the listing. Type "-" to display the listing on the screen.
mget
Copies one or more remote files to the local computer using the current file transfer type. Syntax: mget remote-files [ ...]Parameter(s):
remote-files - Specifies the remote file(s) to copy to the local computer.
mkdir
Creates a remote directory. Syntax: mkdir directoryParameter(s):
directory - Specifies the name of the new remote directory.
mls
Displays an abbreviated list of a remote directory's files and subdirectories. Syntax: mls remote-files [ ...] local-fileParameter(s):
remote-files - Specifies the files for which you want to see a listing. Remote-files must be specified; type "-" to use the current working directory on the remote computer.
local-file - Specifies a local file to store the listing. Type "-" to display the listing on the screen.
mput
Copies one or more local files to the remote computer using the current file transfer type. Syntax: mput local-files [ ...]Parameter(s):
local-files - Specifies the local files to copy to the remote computer.
open
Connects to the specified FTP server. Syntax: open computer [port]Parameter(s):
computer - Specifies the remote computer to connect to. Computer can be specified by IP address or computer name (a DNS or HOSTS file must be available). If auto-login is on (default), FTP also attempts to automatically log the user in to the FTP server (see Ftp command-line options to disable auto-login).
port - Specifies a port number to use to contact an FTP server.
prompt
Toggles prompting. Ftp prompts during multiple file transfers to allow you to selectively retrieve or store files; mget and mput transfer all files if prompting is turned off. By default, prompting is on. Syntax: promptput
Copies a local file to the remote computer using the current file transfer type. See also mput, which can copy multiple files. Syntax: put local-file [remote-file]Parameter(s):
local-file - Specifies the local file to copy.
remote-file - Specifies the name to use on the remote computer. If not specified, the file is given the local-file name.
pwd
Displays the current directory on the remote computer. Syntax: pwdquit
Ends the FTP session with the remote computer and exits ftp. Syntax: quitquote
Sends arguments, verbatim, to the remote FTP server. A single FTP reply code is expected in return. Quote is identical to literal. Syntax: quote argument [ ...]Parameter(s):
argument - Specifies the argument to send to the FTP server.
recv
Copies a remote file to the local computer using the current file transfer type. Recv is identical to get. Syntax: recv remote-file [local-file]Parameter(s):
remote-file - Specifies the remote file to copy.
local-file - Specifies the name to use on the local computer. If not specified, the file is given the remote-file name.
remotehelp
Displays help for remote commands. Syntax: remotehelp [command]Parameter(s):
command - Specifies the name of the command about which you want help. If command is not specified, ftp displays a list of all remote commands.
rename
Renames remote files. Syntax: rename filename newfilenameParameter(s):
filename - Specifies the file you want to rename.
newfilename - Specifies the new filename.
rmdir
Deletes a remote directory. Syntax: rmdir directoryParameter(s):
directory - Specifies the name of the remote directory to delete.
send
Copies a local file to the remote computer using the current file transfer type. Send is identical to put. Syntax: send local-file [remote-file]Parameter(s):
local-file - Specifies the local file to copy.
remote-file - Specifies the name to use on the remote computer. If not specified, the file is given the local-file name.
status
Displays the current status of FTP connections and toggles. Syntax: statustrace
Toggles packet tracing; trace displays the route of each packet when running an ftp command. Syntax: tracetype
Sets or displays the file transfer type. Syntax: type [type-name]Parameter(s):
type-name - Specifies the file transfer type; the default is ASCII. If type-name is not specified, the current type is displayed.
Note
FTP supports two file transfer types, ASCII and binary image.
ASCII should be used when transferring text files. In ASCII mode, character conversions to and from the network standard character set are performed. For example, end-of-line characters are converted as necessary, based on the destination's operating system.
Binary should be used when transferring executable files. In binary mode, the file is moved byte-by-byte.
user
Specifes a user to the remote computer. Syntax: user user-name [password] [account]Parameter(s):
user-name - Specifies a user name with which to log in to the remote computer.
password - Specifies the password for user-name. If not specified, but required, ftp prompts for the password.
account - Specifies an account with which to log on to the remote computer. If account is not specified, but required, ftp prompts for the account.