View Single Post
  #12  
Old 23rd July 2010, 15:27
helicoptermcbill helicoptermcbill is offline
Junior Member
 
Join Date: Jul 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Code:
[root@web ~]# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 *:sunrpc                    *:*                         LISTEN      1049/rpcbind
tcp        0      0 *:41716                     *:*                         LISTEN      1229/rpc.statd
tcp        0      0 *:ssh                       *:*                         LISTEN      1464/sshd
tcp        0      0 localhost:ipp               *:*                         LISTEN      1306/cupsd
tcp        0      0 *:smtp                      *:*                         LISTEN      4189/master
tcp        0      0 localhost:10024             *:*                         LISTEN      6594/amavisd (maste
tcp        0      0 localhost:10025             *:*                         LISTEN      4189/master
tcp        0      0 *:mysql                     *:*                         LISTEN      1594/mysqld
tcp        0      0 localhost:mysql             localhost:57879             ESTABLISHED 1594/mysqld
tcp       58      0 localhost:38048             localhost:10025             CLOSE_WAIT  6609/amavisd (ch1-a
tcp        0      0 localhost:mysql             localhost:44262             ESTABLISHED 1594/mysqld
tcp       58      0 localhost:43003             localhost:10025             CLOSE_WAIT  6608/amavisd (ch1-a
tcp        0      0 localhost:44262             localhost:mysql             ESTABLISHED 6609/amavisd (ch1-a
tcp        0   1148 web.wamtechnology.com:ssh   192.168.1.30:54298          ESTABLISHED 6736/0
tcp        0      0 localhost:57879             localhost:mysql             ESTABLISHED 6608/amavisd (ch1-a
tcp        0      0 *:imap                      *:*                         LISTEN      4376/couriertcpd
tcp        0      0 *:sunrpc                    *:*                         LISTEN      1049/rpcbind
tcp        0      0 *:http                      *:*                         LISTEN      1792/httpd
tcp        0      0 *:ftp                       *:*                         LISTEN      1775/proftpd: (acce
tcp        0      0 *:ssh                       *:*                         LISTEN      1464/sshd
tcp        0      0 localhost:ipp               *:*                         LISTEN      1306/cupsd
tcp        0      0 *:smtp                      *:*                         LISTEN      4189/master
tcp        0      0 *:https                     *:*                         LISTEN      1792/httpd
tcp        0      0 *:imaps                     *:*                         LISTEN      4383/couriertcpd
tcp        0      0 *:pop3s                     *:*                         LISTEN      4395/couriertcpd
tcp        0      0 *:pop3                      *:*                         LISTEN      4389/couriertcpd
and...


Code:
iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:imaps
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:pop3s
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Thanks,

Bill
Reply With Quote