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

     

     

    有一种落差是,你配不上自己的野心,也辜负了所受的苦难
  • 相关阅读:
    C文件读写函数介绍(转)
    字节存储排序:大端和小端的判别及转换
    vc++上的MFC的对象序列化和反序列化
    unicode下各种类型转换,CString,string,char*,int,char[]
    CString与std::string unicode下相互转化
    VS2010每次编译都重新编译整个工程的解决方案
    Windows下用C语言获取进程cpu使用率,内存使用,IO情况
    hadoop 安装
    python---pyc pyo文件详解
    C 高级编程 2 内存管理
  • 原文地址:https://www.cnblogs.com/lfsblack/p/3274652.html
Copyright © 2011-2022 走看看