2015年9月18日 星期五

CentOS 7 command mapping

 Ref :
http://note.tc.edu.tw/931.html
http://note.tc.edu.tw/932.html

  1. netstat

    ss
    ss -lt
    ss -t
  2. route

    ip -route
  3. ifconfig

    ip addr
    ip -s link
  4. arp

    ip neigh
  5. ifconfig

    ip link set eth1 up
    ip link set eth1 down
  6. traceroute

    tracepath 168.95.1.1
  7. service

    systemctl  restart firewalld
    systemctl -l status mysql
    systemctl list-unit-files | grep nginx    //check the default start option , like chkconfig
    systemctl enable nginx


  8. iptables

    firewall-cmd --list-service
    firewall-cmd --list-zone
    firewall-cmd --list-all --permanent
    firewall-cmd --add-service=http
    firewall-cmd --zone=public --list-all
    firewall-cmd --zone=public --add-port=443/tcp
    firewall-cmd --zone=public --remove-port=443
    firewall-cmd --zone=public --add-source=192.168.1.0/24
    firewall-cmd --zone=public -remove-source=192.168.1.0/24
    firewall-cmd --zone=public --list-rich-rules
    firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.2.0/24" port port="8080" protocol="tcp" accept'

    vim /etc/firewalld/zones/public.xml

沒有留言:

張貼留言