zoukankan      html  css  js  c++  java
  • 计算机网络基础识别

    网络主要涉及几个重要概念:

    1,端口

    Linux 查看端口:

          cat /etc/services

          netstat

    Windows查看端口:

          netstat -ano

    Linux打开/关闭端口:

        

    linux系统下,81端口一般情况下是关闭的。

    开启81端口: iptables -I INPUT -i eth0 -p tcp --dport 81 -j ACCEPT iptables -I OUTPUT -o eth0 -p tcp --sport 81 -j ACCEPT
    关闭81端口: iptables -I INPUT -i eth0 -p tcp --dport 81 -j DROP iptables -I OUTPUT -o eth0 -p tcp --sport 81 -j DROP

     

    Windows打开/关闭端口:

       

    关闭端口

    netsh firewall set portopening TCP 端口号 DISABLE

    netsh firewall add portopening protocol = TCP port = 139 name = "关闭139" mode = DISABLE

    netsh firewall add portopening protocol = TCP port = 445 name = "关闭445" mode = DISABLE

    netsh firewall add portopening protocol = UDP port = 137 name = "关闭137" mode = DISABLE

    netsh firewall add portopening protocol = UDP port = 138 name = "关闭138" mode = DISABLE 

    开启端口

    netsh firewall add portopening protocol = TCP port = 139 name = "关闭139" mode = Enabled

    netsh firewall add portopening protocol = TCP port = 445 name = "关闭445" mode =  Enabled

    netsh firewall add portopening protocol = UDP port = 137 name = "关闭137" mode =  Enabled

    netsh firewall add portopening protocol = UDP port = 138 name = "关闭138" mode =  Enabled

     

    Linux查看进程:

      ps -aux

    windows查看进程:

      tasklist

      wimc

    Linux服务操作:

      service name status,start,stop,restart

    windows下服务操作:

      sc

      net

     

     Linux查看当前系统登录的用户

      w

      who

      finger

      last

    剔除登录用户:

      pkill -t pts/n n(为上面查到的数字)

     

     

     

     scp root@173.16.21.61:/root/a/* .

     

    rz

    sz

     

     

     

    Linux下16进制查看:

    1,od -t x1 file

         2,xxd 

    3,vim  :%!xxd

    4,hexdump

     

    ipcs -m -s -q

    ipcrm <shmid>

    cat /proc/sys/kernel/shmmax shmmin  shmall

     

     nslookup查看域名

    http://www.renhaibo.com/archives/29.html

     

     

    有一种落差是,你配不上自己的野心,也辜负了所受的苦难
  • 相关阅读:
    Apache+Tomcat+Mysql+php整合jsp,php
    mysql数据类型详析(转)
    有向图(拓扑排序算法)
    FLEX获取GET数据
    Flex对象与组件的数据 双向绑定
    D3D学习摘记(I)中
    [转贴]深入理解Javascript闭包
    一个相当愚蠢的概念错误
    近日小记
    D3D学习摘记(I)上
  • 原文地址:https://www.cnblogs.com/lfsblack/p/3274652.html
Copyright © 2011-2022 走看看