保留IP分級

0.0.0.0 ~ 255.255.255.255
各級保留IP

Class A:
1) 0.0.0.0/8 : 表示所有、任何、預設的意思

2) 10.0.0.0/8 : 內部網路私有IP使用,這個範圍的IP不可在網際網路上使用,要透過NAT(network address translation)才能用

3) 127.0.0.0/8 : 網路主機的內部迴圈之用,任何發送到127.0.0.1的資料封包,都將原封不動的傳回發送主機上,可用以偵測網路環境是否架設妥當

4) 100.64.0.0/10 : 在IPv4/IPv6轉換期間提供過度解決方案,專門給各地區ISP供應商所使用的CGN(carrier-grade NAT)技術

Class B:
1) 172.16.0.0/12 : 內部網路私有I P,當新加入的電腦主機無法藉由DHCP(dynamic host configuration protocol)獲取相對應的IP設定時,會拿此範圍的IP自動套用



Class C: 

1) 192.168.0.0/16 : 私有IP,家中路由器

2) 192.0.0.0/24、192.0.2.0/24、192.88.99.0/24、198.18.0.0/15、198.51.100.0/24、203.0.113.0/24: 保留給各種技術使用

Kali on RPI記錄(1)- 轉接, 無線網卡, 自動登入, SSH

不知道改什麼?

到/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
Exec=/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log
User=root
SystemdService=wpa_supplicant.service
改成
[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
Exec=/sbin/wpa_supplicant -u -onl80211 -O/var/run/wpa_supplicant

User=root


1. HDMI to VGA轉接頭 輸出到螢幕
=> 記憶卡內新增 config.txt 檔
:
hdmi_force_hotplug=1    #強迫以HDMI輸出
#hdmi_drive=2
#hdmi_group=2
#hdmi_mode=16


因為Raspberry Pi的視訊輸出有Composite RCA(AV端子、又稱複合端子,通常是黃色的RCA端子)與HDMI,兩者不能同時使用。當開機時,系統預設從AV端子輸出,但若偵測到有接HDMI,便會從HDMI輸出。若使用轉接頭或轉接線,Raspberry Pi便可能無法正常偵測,於是仍從AV端子輸出視訊,導致根本沒畫面。

參考:1.葉難 http://yehnan.blogspot.tw/2013/10/raspberry-pi.html
2. 雄:http://gsyan888.blogspot.tw/2013/06/raspberrypi-hdmi-to-vga.html

3. https://www.youtube.com/watch?v=1CiZVk8oJUA



2. 無線網卡上網設定
=> 改 /etc/wpa_supplicant/wpa_supplicant.conf
:
network={
ssid=”RS”             #看WIFI叫什麼名字
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=”12345678″   #WIFI密碼
}

=> 改  /etc/network/interfaces
:  (DHCP版)
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  (固定IP版)


auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0



iface wlan0 inet static
        address 192.168.2.100 #要改
        netmask 255.255.255.0
       gateway 192.168.2.254

參考:1. 樹莓派:https://www.raspberrypi.com.tw/2152/setting-up-wifi-with-the-command-line/
2. 雄:http://gsyan888.blogspot.tw/2013/04/raspberry-pi-wireless-network.html
3. 自動登入 (未成功)
=> 改 /etc/inittab
:

#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
T0:23:respawn:/bin/login -f pi ttyAMA0 </dev/ttyAMA0 >/dev/ttyAMA0 2>&1

=>改 /etc/gdm3/daemon.conf.
:
[daemon]# Enabling automatic login
AutomaticLoginEnable = true
AutomaticLogin = root
=>改 /etc/kde4/kdm/kdmrc
:
[X-:0-Core]
AllowRootLogin=true
AutoLoginAgain=true
AutoLoginDelay=0
AutoLoginEnable=true
AutoLoginLocked=false
AutoLoginUser=root
ClientLogFile=.xsession-errors

=> 重新啟動網路設定
: /etc/init.d/networking restart


參考:1. 夢想不該只是夢想 http://inpega.blogspot.tw/2015/04/blog-post_17.html
2. http://www.blackmoreops.com/2013/12/19/auto-login-root-user-system-start-kali-linux-gnome-kde/



4. SSH(未成功)
=> 改/etc/ssh/sshd_config
#PermitRootLogin without-password
PermitRootLogin yes

=> 改/etc/motd -> 可改登入時顯示的字串 (可加入banner)

=> 重新啟動ssh
: service ssh restart

參考:1.Chaos:Enable SSH on kali: http://www.drchaos.com/enable-ssh-on-kali-linux/
2. banner製造機: http://patorjk.com/software/taag