Net/監視
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#z19ec9e5]
#contents();
/////////////////////////////////////////////////////////...
* ルータに繋がっている全ての機器の IP を調べる [#e042d1c4]
//-------------------------------------------------------...
** 手順1 : arp-scan を使う [#wc2f4b7e]
- arp-scan のコマンド書式(要root権限)
arp-scan -I <interface> -l
- 実行例
# arp-scan -I wlp4s0 -l
Interface: wlp4s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-mon...
192.168.1.1 0b:1a:3b:d5:fe:f6 NEC AccessTechnic...
192.168.1.2 32:85:95:7a:1e:7c Intel Corporate
2 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9: 256 hosts scanned in 2.265 seconds ...
//-------------------------------------------------------...
** 手順2 : netdiscover を使う [#ve906030]
- コマンド書式
# netdiscover -r 192.168.1.0/24
-- オプション -r の引数はレンジで指定しないとエラーになる
- 出力例
Currently scanning: Finished! | Screen View: Unique ...
...
2 Captured ARP Req/Rep packets, from 2 hosts. Total si...
________________________________________________________...
IP At MAC Address Count Len MAC Ve...
--------------------------------------------------------...
192.168.1.1 0b:1a:3b:d5:fe:f6 1 60 NEC Pl...
192.168.1.2 32:85:95:7a:1e:7c 1 42 Intel ...
-- 自機の IP はこのリストには表示されない
//-------------------------------------------------------...
** 手順3 : ifconfig / ping / arp を使う [#gc509bfb]
+ ifconfig で broadcast address を調べる
$ /sbin/ifconfig <interface-name>
0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadca...
inet6 240d::69ff:9f00:cc21:ff25:aa05:311b prefi...
inet6 fe80::d469:8fb1:6fd2:9a08 prefixlen 64 s...
ether 22:80:99:5a:1c:b0 txqueuelen 1000 (イー...
RX packets 746385 bytes 793514361 (756.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 593509 bytes 85367822 (81.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 co...
-- この結果より、
--- IP address: 192.168.1.2
--- broadcast address: 192.168.1.255
+ broadcast address に ping を投げる
$ ping -b 192.168.1.255 # 意図的に broadcast address に...
WARNING: pinging broadcast address
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=3.02 ms
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=42.7 m...
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=2.97 ms
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=61.2 m...
^C
+ root で arp コマンドを投げる
# arp -a
? (192.168.1.3) at 88:95:ad:45:aa:83 [ether] on enp0s25
? (192.168.1.6) at <不完全> on wlp3s0
hoge.fuga (192.168.1.1) at 00:f5:88:95:be:76 [ether] on ...
? (192.168.1.4) at <不完全> on wlp3s0
? (192.168.1.7) at <不完全> on wlp3s0
? (192.168.1.5) at <不完全> on wlp3s0
-- これより、ルータ(192.168.1.1)、コマンド発行元(192.1...
/////////////////////////////////////////////////////////...
* ツール [#fce7742d]
//-------------------------------------------------------...
** pktstat [#oe1b5a59]
- [[Debian6>Debian/ver6]]に入っている
- iptables によるフィルタリングの状況を、topコマンド風に...
- Debianでは、実行にroot権限が必要。
//-------------------------------------------------------...
** iptstate [#g1dac294]
- iptables によるフィルタリングの状況を、topコマンド風に...
- Debianでは、実行にroot権限が必要。
- [[Debian6>Debian/ver6]]には入っていない
終了行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#z19ec9e5]
#contents();
/////////////////////////////////////////////////////////...
* ルータに繋がっている全ての機器の IP を調べる [#e042d1c4]
//-------------------------------------------------------...
** 手順1 : arp-scan を使う [#wc2f4b7e]
- arp-scan のコマンド書式(要root権限)
arp-scan -I <interface> -l
- 実行例
# arp-scan -I wlp4s0 -l
Interface: wlp4s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-mon...
192.168.1.1 0b:1a:3b:d5:fe:f6 NEC AccessTechnic...
192.168.1.2 32:85:95:7a:1e:7c Intel Corporate
2 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9: 256 hosts scanned in 2.265 seconds ...
//-------------------------------------------------------...
** 手順2 : netdiscover を使う [#ve906030]
- コマンド書式
# netdiscover -r 192.168.1.0/24
-- オプション -r の引数はレンジで指定しないとエラーになる
- 出力例
Currently scanning: Finished! | Screen View: Unique ...
...
2 Captured ARP Req/Rep packets, from 2 hosts. Total si...
________________________________________________________...
IP At MAC Address Count Len MAC Ve...
--------------------------------------------------------...
192.168.1.1 0b:1a:3b:d5:fe:f6 1 60 NEC Pl...
192.168.1.2 32:85:95:7a:1e:7c 1 42 Intel ...
-- 自機の IP はこのリストには表示されない
//-------------------------------------------------------...
** 手順3 : ifconfig / ping / arp を使う [#gc509bfb]
+ ifconfig で broadcast address を調べる
$ /sbin/ifconfig <interface-name>
0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadca...
inet6 240d::69ff:9f00:cc21:ff25:aa05:311b prefi...
inet6 fe80::d469:8fb1:6fd2:9a08 prefixlen 64 s...
ether 22:80:99:5a:1c:b0 txqueuelen 1000 (イー...
RX packets 746385 bytes 793514361 (756.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 593509 bytes 85367822 (81.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 co...
-- この結果より、
--- IP address: 192.168.1.2
--- broadcast address: 192.168.1.255
+ broadcast address に ping を投げる
$ ping -b 192.168.1.255 # 意図的に broadcast address に...
WARNING: pinging broadcast address
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=3.02 ms
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=42.7 m...
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=2.97 ms
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=61.2 m...
^C
+ root で arp コマンドを投げる
# arp -a
? (192.168.1.3) at 88:95:ad:45:aa:83 [ether] on enp0s25
? (192.168.1.6) at <不完全> on wlp3s0
hoge.fuga (192.168.1.1) at 00:f5:88:95:be:76 [ether] on ...
? (192.168.1.4) at <不完全> on wlp3s0
? (192.168.1.7) at <不完全> on wlp3s0
? (192.168.1.5) at <不完全> on wlp3s0
-- これより、ルータ(192.168.1.1)、コマンド発行元(192.1...
/////////////////////////////////////////////////////////...
* ツール [#fce7742d]
//-------------------------------------------------------...
** pktstat [#oe1b5a59]
- [[Debian6>Debian/ver6]]に入っている
- iptables によるフィルタリングの状況を、topコマンド風に...
- Debianでは、実行にroot権限が必要。
//-------------------------------------------------------...
** iptstate [#g1dac294]
- iptables によるフィルタリングの状況を、topコマンド風に...
- Debianでは、実行にroot権限が必要。
- [[Debian6>Debian/ver6]]には入っていない
ページ名: