| Port | Protocol | Network Service | System Service | System Service Logical Name |
| 7 | TCP | Echo | Simple TCP/IP Services | SimpTcp |
| 7 | UDP | Echo | Simple TCP/IP Services | SimpTcp |
| 9 | TCP | Discard | Simple TCP/IP Services | SimpTcp |
| 9 | UDP | Discard | Simple TCP/IP Services | SimpTcp |
| 13 | TCP | Daytime | Simple TCP/IP Services | SimpTcp |
| 13 | UDP | Daytime | Simple TCP/IP Services | SimpTcp |
| 17 | TCP | Quotd | Simple TCP/IP Services | SimpTcp |
| 17 | UDP | Quotd | Simple TCP/IP Services | SimpTcp |
| 19 | TCP | Chargen | Simple TCP/IP Services | SimpTcp |
| 19 | UDP | Chargen | Simple TCP/IP Services | SimpTcp |
| 20 | TCP | FTP default data | FTP Publishing Service | MSFtpsvc |
| 21 | TCP | FTP control | FTP Publishing Service | MSFtpsvc |
| 21 | TCP | FTP control | Application Layer Gateway Service | ALG |
| 23 | TCP | Telnet | Telnet | TlntSvr |
| 25 | TCP | SMTP | Simple Mail Transport Protocol | SMTPSVC |
| 25 | UDP | SMTP | Simple Mail Transport Protocol | SMTPSVC |
| 25 | TCP | SMTP | Exchange Server | |
| 25 | UDP | SMTP | Exchange Server | |
| 42 | TCP | WINS Replication | Windows Internet Name Service | WINS |
| 42 | UDP | WINS Replication | Windows Internet Name Service | WINS |
| 53 | TCP | DNS | DNS Server | DNS |
| 53 | UDP | DNS | DNS Server | DNS |
| 53 | TCP | DNS | Internet Connection Firewall/Internet Connection Sharing | SharedAccess |
| 53 | UDP | DNS | Internet Connection Firewall/Internet Connection Sharing | SharedAccess |
| 67 | UDP | DHCP Server | DHCP Server | DHCPServer |
| 67 | UDP | DHCP Server | Internet Connection Firewall/Internet Connection Sharing | SharedAccess |
| 69 | UDP | TFTP | Trivial FTP Daemon Service | tftpd |
| 80 | TCP | HTTP | Windows Media Services | WMServer |
| 80 | TCP | HTTP | World Wide Web Publishing Service | W3SVC |
| 80 | TCP | HTTP | SharePoint Portal Server | |
| 88 | TCP | Kerberos | Kerberos Key Distribution Center | Kdc |
| 88 | UDP | Kerberos | Kerberos Key Distribution Center | Kdc |
| 102 | TCP | X.400 | Microsoft Exchange MTA Stacks | |
| 110 | TCP | POP3 | Microsoft POP3 Service | POP3SVC |
| 110 | TCP | POP3 | Exchange Server | |
| 119 | TCP | NNTP | Network News Transfer Protocol | NntpSvc |
| 123 | UDP | NTP | Windows Time | W32Time |
| 123 | UDP | SNTP | Windows Time | W32Time |
| 135 | TCP | RPC | Message Queuing | msmq |
| 135 | TCP | RPC | Remote Procedure Call | RpcSs |
| 135 | TCP | RPC | Exchange Server | |
| 135 | TCP | RPC | Certificate Services | CertSvc |
| 135 | TCP | RPC | Cluster Service | ClusSvc |
| 135 | TCP | RPC | Distributed File System | DFS |
| 135 | TCP | RPC | Distributed Link Tracking | TrkSvr |
| 135 | TCP | RPC | Distributed Transaction Coordinator | MSDTC |
| 135 | TCP | RPC | Event Log | Eventlog |
| 135 | TCP | RPC | Fax Service | Fax |
| 135 | TCP | RPC | File Replication | NtFrs |
| 135 | TCP | RPC | Local Security Authority | LSASS |
| 135 | TCP | RPC | Remote Storage Notification | Remote_Storage_User_Link |
| 135 | TCP | RPC | Remote Storage Server | Remote_Storage_Server |
| 135 | TCP | RPC | Systems Management Server 2.0 | |
| 135 | TCP | RPC | Terminal Services Licensing | TermServLicensing |
| 135 | TCP | RPC | Terminal Services Session Directory | Tssdis |
| 137 | UDP | NetBIOS Name Resolution | Computer Browser | Browser |
| 137 | UDP | NetBIOS Name Resolution | Server | lanmanserver |
| 137 | UDP | NetBIOS Name Resolution | Windows Internet Name Service | WINS |
| 137 | UDP | NetBIOS Name Resolution | Net Logon | Netlogon |
| 137 | UDP | NetBIOS Name Resolution | Systems Management Server 2.0 | |
| 138 | UDP | NetBIOS Datagram Service | Computer Browser | Browser |
| 138 | UDP | NetBIOS Datagram Service | Messenger | Messenger |
| 138 | UDP | NetBIOS Datagram Service | Server | lanmanserver |
| 138 | UDP | NetBIOS Datagram Service | Net Logon | Netlogon |
| 138 | UDP | NetBIOS Datagram Service | Distributed File System | Dfs |
| 138 | UDP | NetBIOS Datagram Service | Systems Management Server 2.0 | |
| 138 | UDP | NetBIOS Datagram Service | License Logging Service | LicenseService |
| 139 | TCP | NetBIOS Session Service | Computer Browser | Browser |
| 139 | TCP | NetBIOS Session Service | Fax Service | Fax |
| 139 | TCP | NetBIOS Session Service | Performance Logs and Alerts | SysmonLog |
| 139 | TCP | NetBIOS Session Service | Print Spooler | Spooler |
| 139 | TCP | NetBIOS Session Service | Server | lanmanserver |
| 139 | TCP | NetBIOS Session Service | Net Logon | Netlogon |
| 139 | TCP | NetBIOS Session Service | Remote Procedure Call Locator | RpcLocator |
| 139 | TCP | NetBIOS Session Service | Distributed File System | Dfs |
| 139 | TCP | NetBIOS Session Service | Systems Management Server 2.0 | |
| 139 | TCP | NetBIOS Session Service | License Logging Service | LicenseService |
| 143 | TCP | IMAP | Exchange Server | |
| 161 | UDP | SNMP | SNMP Service | SNMP |
| 162 | UDP | SNMP Traps Outbound | SNMP Trap Service | SNMPTRAP |
| 270 | TCP | MOM 2004 | Microsoft Operations Manager 2004 | MOM |
| 389 | TCP | LDAP Server | Local Security Authority | LSASS |
| 389 | UDP | LDAP Server | Local Security Authority | LSASS |
| 389 | TCP | LDAP Server | Distributed File System | Dfs |
| 389 | UDP | LDAP Server | Distributed File System | Dfs |
| 443 | TCP | HTTPS | HTTP SSL | HTTPFilter |
| 443 | TCP | HTTPS | World Wide Web Publishing Service | W3SVC |
| 443 | TCP | HTTPS | SharePoint Portal Server | |
| 445 | TCP | SMB | Fax Service | Fax |
| 445 | TCP | SMB | License Logging Service | LicenseService |
| 445 | TCP | SMB | Print Spooler | Spooler |
| 445 | TCP | SMB | Server | lanmanserver |
| 445 | TCP | SMB | Remote Procedure Call Locator | RpcLocator |
| 445 | TCP | SMB | Distributed File System | Dfs |
| 445 | TCP | SMB | Net Logon | Dfs |
| 500 | UDP | IPSec ISAKMP | Local Security Authority | LSASS |
| 515 | TCP | LPD | TCP/IP Print Server | LPDSVC |
| 548 | TCP | File Server for Macintosh | File Server for Macintosh | MacFile |
| 554 | TCP | RTSP | Windows Media Services | WMServer |
| 563 | TCP | NNTP over SSL | Network News Transfer Protocol | NntpSvc |
| 593 | TCP | RPC over HTTP | Remote Procedure Call | RpcSs |
| 593 | TCP | RPC over HTTP | Exchange Server | |
| 636 | TCP | LDAP SSL | Local Security Authority | LSASS |
| 636 | UDP | LDAP SSL | Local Security Authority | LSASS |
| 993 | TCP | IMAP over SSL | Exchange Server | |
| 995 | TCP | POP3 over SSL | Exchange Server | |
| 1270 | TCP | MOM-Encrypted | Microsoft Operations Manager 2000 | one point |
| 1433 | TCP | SQL over TCP | Microsoft SQL Server | SQLSERVR |
| 1433 | TCP | SQL over TCP | MSSQL$UDDI | SQLSERVR |
| 1434 | UDP | SQL Probe | Microsoft SQL Server | SQLSERVR |
| 1434 | UDP | SQL Probe | MSSQL$UDDI | SQLSERVR |
| 1645 | UDP | Legacy RADIUS | Internet Authentication Service | IAS |
| 1646 | UDP | Legacy RADIUS | Internet Authentication Service | IAS |
| 1701 | UDP | L2TP | Routing and Remote Access | RemoteAccess |
| 1723 | TCP | PPTP | Routing and Remote Access | RemoteAccess |
| 1755 | TCP | MMS | Windows Media Services | WMServer |
| 1755 | UDP | MMS | Windows Media Services | WMServer |
| 1801 | TCP | MSMQ | Message Queuing | msmq |
| 1801 | UDP | MSMQ | Message Queuing | msmq |
| 1812 | UDP | RADIUS Authentication | Internet Authentication Service | IAS |
| 1813 | UDP | RADIUS Accounting | Internet Authentication Service | IAS |
| 1900 | UDP | SSDP | SSDP Discovery Service | SSDPRSRV |
| 2101 | TCP | MSMQ-DCs | Message Queuing | msmq |
| 2103 | TCP | MSMQ-RPC | Message Queuing | msmq |
| 2105 | TCP | MSMQ-RPC | Message Queuing | msmq |
| 2107 | TCP | MSMQ-Mgmt | Message Queuing | msmq |
| 2393 | TCP | OLAP Services 7.0 | SQL Server: Downlevel OLAP Client Support | |
| 2394 | TCP | OLAP Services 7.0 | SQL Server: Downlevel OLAP Client Support | |
| 2460 | UDP | MS Theater | Windows Media Services | WMServer |
| 2535 | UDP | MADCAP | DHCP Server | DHCPServer |
| 2701 | TCP | SMS Remote Control (control) | SMS Remote Control Agent | |
| 2701 | UDP | SMS Remote Control (control) | SMS Remote Control Agent | |
| 2702 | TCP | SMS Remote Control (data) | SMS Remote Control Agent | |
| 2702 | UDP | SMS Remote Control (data) | SMS Remote Control Agent | |
| 2703 | TCP | SMS Remote Chat | SMS Remote Control Agent | |
| 2703 | UDP | SMS Remote Chat | SMS Remote Control Agent | |
| 2704 | TCP | SMS Remote File Transfer | SMS Remote Control Agent | |
| 2704 | UDP | SMS Remote File Transfer | SMS Remote Control Agent | |
| 2725 | TCP | SQL Analysis Services | SQL 2000 Analysis Server | |
| 2869 | TCP | UPNP | Universal Plug and Play Device Host | UPNPHost |
| 2869 | TCP | SSDP event notification | SSDP Discovery Service | SSDPRSRV |
| 3268 | TCP | Global Catalog Server | Local Security Authority | LSASS |
| 3269 | TCP | Global Catalog Server | Local Security Authority | LSASS |
| 3343 | UDP | Cluster Services | Cluster Service | ClusSvc |
| 3389 | TCP | Terminal Services | NetMeeting Remote Desktop Sharing | mnmsrvc |
| 3389 | TCP | Terminal Services | Terminal Services | TermService |
| 3527 | UDP | MSMQ-Ping | Message Queuing | msmq |
| 4011 | UDP | BINL | Remote Installation | BINLSVC |
| 4500 | UDP | NAT-T | Local Security Authority | LSASS |
| 5000 | TCP | SSDP legacy event notification | SSDP Discovery Service | SSDPRSRV |
| 5004 | UDP | RTP | Windows Media Services | WMServer |
| 5005 | UDP | RTCP | Windows Media Services | WMServer |
| 42424 | TCP | ASP.Net Session State | ASP.NET State Service | aspnet_state |
| 51515 | TCP | MOM-Clear | Microsoft Operations Manager 2000 | one point |
Friday, September 19, 2008
Friday, August 1, 2008
Managing MYSL on Linux
Important MYSQL commands
Field Types in SQL
INTEGER - A whole number
VARCHAR(10) - Up to 10 characters.
CHAR(10) - Fixed number of characters
DATE - A date
DATETIME - Date and time
FLOAT - Floating point numbers
Field Types specific to MySQL
TEXT - Allows up to 65535 characters
DECIMAL(10,2) - Up to 10 digits before the point, 2 after.
mysqld - MySQL server daemon safe_mysqld - Server process monitor mysqlaccess - Tool for creating MySQL users mysqladmin - Utility for administering MySQL mysqldump - Tool for dumping the contents of a MySQL database. Useful for backing up a database from within the console.
mysql - Command line interface to MySQL mysqlshow - List all MySQL database
Field Types specific to MySQL
TEXT - Allows up to 65535 characters
DECIMAL(10,2) - Up to 10 digits before the point, 2 after.
TO create the Database
$ mysqlshow --user=ravi --password=xxx addressdb
Field Types in SQL
INTEGER - A whole number
VARCHAR(10) - Up to 10 characters.
CHAR(10) - Fixed number of characters
DATE - A date
DATETIME - Date and time
FLOAT - Floating point numbers
Field Types specific to MySQL
TEXT - Allows up to 65535 characters
DECIMAL(10,2) - Up to 10 digits before the point, 2 after.
Field Types specific to MySQL
TEXT - Allows up to 65535 characters
DECIMAL(10,2) - Up to 10 digits before the point, 2 after.
TO create the Database
$ mysqladmin --user=ravi --password=xxx create database addressdbList the tables in the database "addressdb"
To use the Database$ mysql --user=ravi --password=xxx
mysql> USE addressdb,
To create Table
mysql> CREATE TABLE p_addr (i INTEGER PRIMARY KEY,address TEXT,email VARCHAR(30),pincode DECIMAL(10),phone DECIMAL(15),website TEXT);
To add a column "india" to the table
mysql> ALTER TABLE p_addr ADD india VARCHAR(30);
To insert value in Table
mysql> INSERT INTO p_addr VALUES (1,"My, present, address","prakash@xyz.com",681024,2122536, "http://gadbu.blogspot.com","Prakash");
To List the contents of the Table
mysql> SELECT * FROM p_addr;
To delete a row from Table
mysql> DELETE FROM p_addr WHERE i=1;
To Rename a column in the table from "address" to "home_address"
mysql> ALTER TABLE p_addr CHANGE address home_address INTEGER;
Note: You cannot use this method to rename a column which is a primary key.
Change an existing record in the table
mysql> UPDATE p_addr SET name="Sumitra" WHERE i=2;
Delete the table from the database
mysql> DROP TABLE p_addr;
List the databases
$ mysqlshow --user=ravi --password=xxx
$ mysqlshow --user=ravi --password=xxx addressdb
Tuesday, July 8, 2008
TCP DUMP TIPS
tcpdump -w trace.cap -p -n -s 0 "udp”- -p : doesn’t start in promiscuous mode, only frames from or to the Asterisk node will be captured,-n : no name resolution, otherwise we will have a lot of DNS queries which is not useful at that stage, we could do name resolution afterwards if needed,
- -s 0 : we get the full frame, not only the first bytes. When working only at the protocol level it is enough to get only the start of each frames, in our case we are requiring the content of the SIP and RTP frames. 0 means getting the whole frame,
- -w output file : all the captured frames will be stored in the file. That way we will be able, afterwards, to analyze the frames from the file. If using ‘-’ as the name of the file, the output is send to the standard output, we will use this afterwards.
- tcpdump not port 22 (to exclude port 22)
- tcpdump not port 143 and not port 25 and not port 22
- tcpdump port 143
- tcpdump host hal9000 (to get data from a specific host on the network)
- tcpdump -i eth1
- tcpdump udp (to specify a protocol )
- tcpdump -l | tee tcpdump_`date +%Y%m%e-%k.%M` (to Save Output for Later)
To dump its output into a binary format which it can read later.
To create a binary file
- tcpdump -w tcpdump_raw_`date +%Y%m%e-%k.%M` ( To create a binary file)
- tcpdump -r tcpdump_raw_YYYMMDD-H.M (To read the created file)
- all packets arriving at or departing from 192.168.0.2
- # tcpdump -n host 192.168.0.2
- To print traffic between 192.168.0.2 and either 10.0.0.4 or 10.0.0.5:
- # tcpdump -n host 192.168.0.2 and \( 10.0.0.4 or 10.0.0.5 \)
- To print all IP packets between 192.168.0.2 and any host except 10.0.0.5:
- # tcpdump ip -n host 192.168.0.2 and not 10.0.0.5
- To print all ftp traffic through internet gateway xx:
- # tcpdump 'gateway xx and (port ftp or ftp-data)'
- To print traffic neither sourced from nor destined for local hosts (if you gateway to one other net, this stuff should never make it onto your local net).
- # tcpdump ip and not net localnet
- To print the start and end packets (the SYN and FIN packets) of each TCP conversation that involves a non-local host.
- # tcpdump 'tcp[13] & 3 != 0 and not src and dst net localnet'
- To print IP packets longer than 576 bytes sent through gateway xx:
- # tcpdump 'gateway xx and ip[2:2] > 576'
- To print IP broadcast or multicast packets that were not sent via ethernet broadcast or multicast:
- # tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'
- To print all ICMP packets that are not echo requests/replies (i.e., not ping packets):
- # tcpdump 'icmp[0] != 8 and icmp[0] != 0"
Saturday, June 14, 2008
Friday, June 6, 2008
Hard Disk Cloning in Linux
dd command does not copy files only it copies blocks also.
To make a clone of a hard disk /dev/sda on an empty hard disk /dev/sdb type the following command
To make a clone of a hard disk /dev/sda on an empty hard disk /dev/sdb type the following command
dd if=/dev/sda of=/dev/sdb
Note:-
- here if specifies input file and of specifies output file.
- Wait untill the command is finished.
- Finally you will have an exact copy of the hard disk.
Thursday, June 5, 2008
command to replace a word from a file.
Command to replace a particular string (as many times in a file) from a particular file
ls /full/path/offile | xargs perl -pi -e 's/word to search/wordto replace with/g'
Subscribe to:
Posts (Atom)