TP sysres IMA2a5 2015/2016 G3 : Différence entre versions
De Wiki d'activités IMA
Ligne 198 : | Ligne 198 : | ||
<pre> | <pre> | ||
− | + | 1 /etc/ssh/sshd_config | |
+ | 2 vim /etc/ssh/sshd_config | ||
+ | 3 /etc/ssh/sshd_config | ||
+ | 4 ls | ||
+ | 5 vi /etc/ssh/sshd_config | ||
+ | 6 vi /etc/network/interfaces | ||
+ | 7 ifdown eth0 | ||
+ | 8 ifup eth0 | ||
+ | 9 apt-get purge network-manager | ||
+ | 10 apt-get purge systemd | ||
+ | 11 apt-get purge network-manager systemd | ||
+ | 12 apt-get purge systemd | ||
+ | 13 apt-get purge network-manager systemd | ||
+ | 14 ifup eth0 | ||
+ | 15 vi /etc/ssh/sshd_config | ||
+ | 16 route -n | ||
+ | 17 cat /etc/network/interfaces | ||
+ | 18 nano /etc/network/interfaces | ||
+ | 19 apt-get purge network-manager systemd | ||
+ | 20 apt-get purge network-manager | ||
+ | 21 apt-get purge systemd | ||
+ | 22 ifdown eth0 | ||
+ | 23 ifup eth0 | ||
+ | 24 apt-get purge systemd | ||
+ | 25 route -n | ||
+ | 26 apt-get purge systemd | ||
+ | 27 apt-get purge systemd | ||
+ | 28 route -n | ||
+ | 29 reboot | ||
+ | 30 /etc/ssh/sshd_config | ||
+ | 31 su | ||
+ | 32 apt-get purge network-manager systemd | ||
+ | 33 nano /etc/inittab | ||
+ | 34 cat /etc/inittab | ||
+ | 35 apt-get purge systemd | ||
+ | 36 reboot | ||
+ | 37 apt-get purge systemd | ||
+ | 38 ping www.google.com | ||
+ | 39 bind9 | ||
+ | 40 /etc/bind/ | ||
+ | 41 apt-get bind9 | ||
+ | 42 apt-get install bind9 | ||
+ | 43 cat /etc/bind/named.conf | ||
+ | 44 cat /etc/bind/named.conf.options | ||
+ | 45 cat /etc/bind/named.conf.local | ||
+ | 46 apt-get install bind9-doc | ||
+ | 47 show ip | ||
+ | 48 showip | ||
+ | 49 cat /etc/network/interfaces | ||
+ | 50 apt-get install ssh | ||
+ | 51 apt-get install apache2 | ||
+ | 52 cat /var/log/daemon.log | ||
+ | 53 host www.hunt3r.lol localhost | ||
+ | 54 vi /etc/bind/named.conf.options | ||
+ | 55 vi /etc/bind/named.conf.local | ||
+ | 56 vi /etc/bind/named.conf.options | ||
+ | 57 vim /etc/bind/named.conf.options | ||
+ | 58 nano /etc/bind/named.conf.options | ||
+ | 59 apt-get install vim strace tcpdump | ||
+ | 60 apt-get install host | ||
+ | 61 host -t ni love-in-the-world.space | ||
+ | 62 host -t any love-in-the-world.space | ||
+ | 63 cd /etc/bind | ||
+ | 64 ls | ||
+ | 65 vim named.conf | ||
+ | 66 cat named.conf | ||
+ | 67 ls | ||
+ | 68 vim named.conf.options | ||
+ | 69 cp db.local db.love-in-the-world | ||
+ | 70 cat named.conf.default-zones | ||
+ | 71 vim named.conf.local | ||
+ | 72 cat named.conf.local | ||
+ | 73 vim db.love-in-the-world | ||
+ | 74 vim db.love-in-the-world | ||
+ | 75 service bind9 stop | ||
+ | 76 service bind9 start | ||
+ | 77 cat /var/log/daemon.log | ||
+ | 78 vim db.love-in-the-world | ||
+ | 79 service bind9 stop | ||
+ | 80 vim db.love-in-the-world | ||
+ | 81 service bind9 start | ||
+ | 82 cat /var/log/daemon.log | ||
+ | 83 cat /var/log/daemon.log | ||
</pre> | </pre> |
Version du 6 novembre 2015 à 11:36
Sommaire
Projet Système & Réseaux IMA2A S9
Partie I - Configuration du point d’accès
a) Restriction par adresse MAC
Ci-dessous, le tableau regroupant Les adresses et Vlan associés aux élèves :
Nom | adresse MAC |
---|---|
Nounours | 00:15:af:e7::19:f3 |
Jeuno | 00:15:af:e6:ed:b1 |
John | 00:22:43:43:e7:7d |
Loki | 00:15:af:e7:64:03 |
On récupère les adresses mac comme ci dessous.
pifou@heron:~$ su Mot de passe : root@heron:/home/pifou# ifconfig lo Link encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 adr inet6: ::1/128 Scope:Hôte UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:2348 errors:0 dropped:0 overruns:0 frame:0 TX packets:2348 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:244556 (238.8 KiB) TX bytes:244556 (238.8 KiB) wlan0 Link encap:Ethernet HWaddr 00:22:43:43:e7:7d inet adr:172.26.79.61 Bcast:172.26.79.255 Masque:255.255.240.0 adr inet6: fe80::222:43ff:fe43:e77d/64 Scope:Lien adr inet6: 2001:660:4401:6006:222:43ff:fe43:e77d/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12046 errors:0 dropped:1471 overruns:0 frame:0 TX packets:9787 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:7742849 (7.3 MiB) TX bytes:1442360 (1.3 MiB)
1) Configuration du point d’accès Cisco
Conexion a la borne Cisco : -Branchement en comunication serie sur le port RJ45 (Console de la Cisco).
pifou@zabeth04:~$ su pifou@zabeth04:~$ minicom // conexion au point Cisco ap#enable ap#Config t
Il faut autoriser les adresses mac désignés à ce connecter aux point d’accès et refuser l’accès des autres
ap(config)#no access-list 701 deny 0000.0000.0000 ffff.ffff.ffff ap(config)#access-list 701 permit 0015.afe7.6403 0000.0000.0000 ap(config)#access-list 701 permit 0015.afe6.edb1 0000.0000.0000 ap(config)#access-list 701 permit 0015.afe7.19f3 0000.0000.0000 ap(config)#access-list 701 permit 0015.afe6.edb1 0000.0000.0000 ap(config)#access-list 701 deny 0000.0000.0000 ffff.ffff.ffff
Configuration du SSID
ap(config)#dot11 ssid T2 ap(config-ssid)#dot11 ssid T2 ap(config-ssid)#authentication open ap(config-ssid)#guest-mode ap(config)#interface dot11Radio0 ap(config-if)#ssid T2 ap(config-if)#encryption key 1 ap(config-if)#encryption key 1 size 40bit 0 01abcd1532 transmit-key ap(config-if)#encryption mode Wep mandatory end ap(config)#interface Dot11Radio0 ap(config-if)#no shutdown
Pour voir si des machines sont connecté sur le point d’accès </pre> sh do11 associations </pre>
1) Configuration du Wifi sur l'eeePC
Configuration:
root@heron:/home/pifou# cat /etc/network/interfaces source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # Ethernet interface #auto eth0 #iface eth0 inet static # address 172.26.79.241 # netmask 255.255.240.0 # gateway 172.26.79.254 auto wlan0 iface wlan0 inet static wireless-mode managed wireless-essid T2 wireless-key 1111111111 address 172.26.79.61 netmask 255.255.240.0 gateway 172.26.79.254
conexion au PA
ifup wlan0 iwconfig wlan0 essid T2
on est bien connecté :
wlan0 IEEE 802.11bgn ESSID:"T2" Mode:Managed Frequency:2.447 GHz Access Point: C4:14:3C:12:EA:00 Bit Rate=54 Mb/s Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:1111-1111-11 Power Management:off Link Quality=70/70 Signal level=-38 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:4104 Missed beacon:0 lo no wireless extensions. eth0 no wireless extensions.
Partie II - Installation de ma machine virtuel
// Conexion au serveur ssh root@cordouan.insecserv.deule.net // Création de la Machine virtuel ( nom : chien) xen-create-image --hostname chien --ip 193.48.57.181 --dir /usr/local/xen // On observe la virtualisation tail -f /var/log/xen-tools/chien.log root@cordouan:~# cd /etc/xen/ root@cordouan:/etc/xen# vim chien.cfg // on met plus de memoire => 1024 // conexion en mode bridge=IMA2a root@cordouan:/etc/xen# xl list root@cordouan:/etc/xen# xl create chien.cfg
on se connecte a notre MV:
ssh root@cordouan.insecserv.deule.net root@cordouan:/etc/xen# xl console chien
/etc/ssh/sshd_config PermitRootLogin yes if down eth0 ifup etho apt-get purge network-manage apt-get purge systemd /etc/inittable // fin ligne tty0 ==> hvc0
// Configuration de eth0 # The primary network interface auto eth0 iface eth0 inet static address 193.48.57.181 netmask 255.255.255.240 gatway 193.48.57.190 root@chien:~# ifdown eth0 root@chien:~# ifup eth0
Serveur DNS modification du fichier /var/cache/bind option
1 /etc/ssh/sshd_config 2 vim /etc/ssh/sshd_config 3 /etc/ssh/sshd_config 4 ls 5 vi /etc/ssh/sshd_config 6 vi /etc/network/interfaces 7 ifdown eth0 8 ifup eth0 9 apt-get purge network-manager 10 apt-get purge systemd 11 apt-get purge network-manager systemd 12 apt-get purge systemd 13 apt-get purge network-manager systemd 14 ifup eth0 15 vi /etc/ssh/sshd_config 16 route -n 17 cat /etc/network/interfaces 18 nano /etc/network/interfaces 19 apt-get purge network-manager systemd 20 apt-get purge network-manager 21 apt-get purge systemd 22 ifdown eth0 23 ifup eth0 24 apt-get purge systemd 25 route -n 26 apt-get purge systemd 27 apt-get purge systemd 28 route -n 29 reboot 30 /etc/ssh/sshd_config 31 su 32 apt-get purge network-manager systemd 33 nano /etc/inittab 34 cat /etc/inittab 35 apt-get purge systemd 36 reboot 37 apt-get purge systemd 38 ping www.google.com 39 bind9 40 /etc/bind/ 41 apt-get bind9 42 apt-get install bind9 43 cat /etc/bind/named.conf 44 cat /etc/bind/named.conf.options 45 cat /etc/bind/named.conf.local 46 apt-get install bind9-doc 47 show ip 48 showip 49 cat /etc/network/interfaces 50 apt-get install ssh 51 apt-get install apache2 52 cat /var/log/daemon.log 53 host www.hunt3r.lol localhost 54 vi /etc/bind/named.conf.options 55 vi /etc/bind/named.conf.local 56 vi /etc/bind/named.conf.options 57 vim /etc/bind/named.conf.options 58 nano /etc/bind/named.conf.options 59 apt-get install vim strace tcpdump 60 apt-get install host 61 host -t ni love-in-the-world.space 62 host -t any love-in-the-world.space 63 cd /etc/bind 64 ls 65 vim named.conf 66 cat named.conf 67 ls 68 vim named.conf.options 69 cp db.local db.love-in-the-world 70 cat named.conf.default-zones 71 vim named.conf.local 72 cat named.conf.local 73 vim db.love-in-the-world 74 vim db.love-in-the-world 75 service bind9 stop 76 service bind9 start 77 cat /var/log/daemon.log 78 vim db.love-in-the-world 79 service bind9 stop 80 vim db.love-in-the-world 81 service bind9 start 82 cat /var/log/daemon.log 83 cat /var/log/daemon.log