note

Cisco Router 設定

Password Recorivy Power ON, CTRL-break confreg 0x2142 reload enable copy startup-config running-config no shutdown: open port change password config-register 0x2102: get back to normal boot 7609 洗掉 config enable write erase reload 這時候可能 default reboot 會進入 Romman 狀態,繼續下 boot 會來到正常狀態 下 configreg 0x2102 (或 configreg 0x2101) 讓開機直接進到正常狀態 參考 configreg Reset Routing vrrp 作 gateway 備援使用 有三種狀態 初始狀態(Initialize)、主狀態(Master)、備援狀態(Backup) NX-OS 沒有權限時,重設 admin 密碼 參考

Cisco Switch 設定

2960 參考 Document 不知道後面接啥就 “?” 一下嚕~~ Vlan31: 17網段 Vlan14: 168網段 刷新 http://notthenetwork.me/blog/2013/05/28/reset-a-cisco-2960-switch-to-factory-default-settings/ 開機時長按 mode 鍵,直到燈號快閃 flash_init del flash:config.text del flash:vlan.dat boot Console connect Serial -> Serial port(在裝置管理員看的到) -> 9600 screen /dev/tty.

DHCP 設定

Server CentOS CentOS 7: Install dhcpd and run DHCP server lease: /var/lib/dhcpd/dhcpd.leases config: /etc/dhcp/dhcpd.conf option domain-name "calee.xyz"; option domain-name-servers 140.113.235.1, 1.1.1.1, 9.9.9.9, 8.8.8.8; default-lease-time 600; max-lease-time 7200; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.

Docker

參考資料 《Docker —— 從入門到實踐》 Docker 簡介 安裝 Ubuntu sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.

file system

fstab mount NTFS find here /etc/fstab UUID=989CE0C49CE09E4E /home/calee/stg ntfs-3g defaults 0 0 Find UUID it’s a symbolic link to /dev/sd_ find here ls -l /dev/disk/by-uuid 檢視分割磁碟區 sudo apt install gparted sudo gparted link ln -s TARGET(src) LINK_NAME(dst) # soft link

firewalld 設定

firewalld sudo firewall-cmd --get-default-zone sudo firewall-cmd --set-default-zone=internal sudo firewall-cmd --get-active-zones sudo firewall-cmd --list-all-zones 換腳 firewal-cmd --permanent --zone=public --remove-interface=ens34 firewall-cmd --permanent --zone=internal --add-interface=ens34 Allow / Deney port sudo firewall-cmd --zone=public --add-port=12345/tcp --permanent sudo firewall-cmd --zone=public --remove-port=12345/tcp --permanent Introduction to FirewallD on CentOS

GitHub 入門

GitHub 註冊 首先到 GitHub 點下網站上的Sign Up 依網站要求輸入相關資料 帳號開通後即完成!! 安裝Git Windows 首先到 Git for windows下載Git for windows安裝檔 執行安裝檔安裝Git 安裝完後, 電腦上應該會出現一個Git Bash程式, 按下並執行Git Bash Linux sudo apt-get install git // debian or ubuntu sudo yum install git-core //fedora sudo dnf install git // fedora 24 or upper MAC brew install git or

iptables 使用小記

iptables 參考 iptables [-t table] command CHAIN [NUM] match criteria -j ACTION CHAIN -N: (new) new a chain -X: delete chain -F: flush all chain -Z: zero the pkg counter -P: policy of chain -E: rename rule -A: append rule -I: insert rule to number -R: replace -D: delete LIST -L: list -S: Specification -n: user number to show -v: verbose -x: show msg –line number: show line number DST-NAT sudo sysctl net.

Jupyter 設定

Install pip install jupyter sudo pip3 install --upgrade pip sudo pip3 install jupyter Error ModuleNotFoundError: No module named '_sqlite3' ModuleNotFoundError: No module named 'pysqlite2' Used start cd /要用來存資料的資料夾/ jupyter notebook 參數 --ip --port --no-browser --help config 環境設定 ipython --ipython-dir= # override the default IPYTHONDIR directory, ~/.

LDAP

freeIPA OpenLDAP Server NFS NIS LDAP Client NFS NIS LDAP 需要下載 sudo yum update && yum install openldap openldap-clients nss-pam-ldapd 複製 server 端的 CAe 產生 config authconfig --enableldap --enableldapauth --ldapserver=ldaps://ldaps.