Compare commits

...

7 Commits

Author SHA1 Message Date
0475fcebae tkt 2025-12-10 10:53:42 +01:00
c22e02624b modif 2025-12-10 10:52:38 +01:00
af0658cdc8 modif 2025-12-09 10:07:10 +01:00
0766d3b581 tkt 2025-12-09 10:06:26 +01:00
ff1a8b9f24 Fini mais bancal 2025-12-09 10:05:20 +01:00
84549dbd4d erge branch 'main' of https://grond.iut-fbleau.fr/solar/SCR 2025-12-09 10:03:43 +01:00
e7208f5ade Fini mais bancal 2025-12-09 10:03:21 +01:00
8 changed files with 47 additions and 509 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,488 +0,0 @@
node n0 {
type lanswitch
network-config {
hostname switch1
!
}
canvas c0
iconcoords {264 72}
labelcoords {264 95}
interface-peer {e0 n6}
interface-peer {e1 n7}
}
node n1 {
type lanswitch
network-config {
hostname switch2
!
}
canvas c0
iconcoords {456 216}
labelcoords {456 239}
interface-peer {e0 n6}
interface-peer {e1 n8}
interface-peer {e2 n9}
interface-peer {e3 n14}
}
node n4 {
type router
model quagga
network-config {
hostname router1
!
interface eth0
mac address 42:00:aa:00:00:0d
ip address 45.45.45.253/21
!
interface eth1
mac address 42:00:aa:00:00:08
ip address 62.62.62.253/19
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
router rip
redistribute static
redistribute connected
redistribute ospf
network 0.0.0.0/0
!
router ripng
redistribute static
redistribute connected
redistribute ospf6
network ::/0
!
}
auto_default_routes enabled
canvas c0
iconcoords {648 552}
labelcoords {648 577}
interface-peer {eth1 n5}
interface-peer {eth0 n3}
custom-configs {
}
custom-selected
}
node n5 {
type router
model quagga
network-config {
hostname router2
!
interface eth1
mac address 42:00:aa:00:00:0a
ip address 37.37.37.254/22
!
interface eth0
mac address 42:00:aa:00:00:07
ip address 62.62.62.254/19
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
router rip
redistribute static
redistribute connected
redistribute ospf
network 0.0.0.0/0
!
router ripng
redistribute static
redistribute connected
redistribute ospf6
network ::/0
!
}
auto_default_routes enabled
canvas c0
iconcoords {264 552}
labelcoords {264 577}
interface-peer {eth0 n4}
interface-peer {eth1 n10}
}
node n6 {
type host
network-config {
hostname GW1
!
interface eth1
mac address 42:00:aa:00:00:01
ip address 172.16.2.253/24
!
interface eth0
mac address 42:00:aa:00:00:00
ip address 172.16.1.253/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
canvas c0
iconcoords {264 216}
labelcoords {264 252}
interface-peer {eth0 n0}
interface-peer {eth1 n1}
custom-configs {
custom-config-id default {
custom-command /bin/sh
config {
ip addr add 127.0.0.1/8 dev lo0
ip addr add 172.16.1.253/24 dev eth0
ip addr add 172.16.2.253/24 dev eth1
ip -6 addr add ::1/128 dev lo0
ip route add 0.0.0.0/0 via 172.16.2.254
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.2.253
rpcbind
inetd
}
}
}
custom-enabled true
custom-selected default
}
node n7 {
type pc
network-config {
hostname pc1
!
interface eth0
mac address 42:00:aa:00:00:02
ip address 172.16.1.1/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 172.16.1.253
!
}
canvas c0
iconcoords {24 72}
labelcoords {24 103}
interface-peer {eth0 n0}
}
node n8 {
type pc
network-config {
hostname pc2
!
interface eth0
mac address 42:00:aa:00:00:03
ip address 172.16.2.2/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 172.16.2.254
!
}
canvas c0
iconcoords {456 360}
labelcoords {456 391}
interface-peer {eth0 n1}
}
node n10 {
type pc
network-config {
hostname pc
!
interface eth0
mac address 42:00:aa:00:00:09
ip address 37.37.37.1/22
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 37.37.37.254
!
}
canvas c0
iconcoords {24 552}
labelcoords {24 583}
interface-peer {eth0 n5}
}
node n11 {
type pc
network-config {
hostname pc3
!
interface eth0
mac address 42:00:aa:00:00:0e
ip address 172.16.3.3/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
canvas c0
iconcoords {840 72}
labelcoords {840 103}
interface-peer {eth0 n2}
}
node n12 {
type host
network-config {
hostname host1
!
interface eth0
mac address 42:00:aa:00:00:0b
ip address 45.45.45.1/21
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
ip route 0.0.0.0/0 45.45.45.253
!
}
canvas c0
iconcoords {840 360}
labelcoords {840 396}
interface-peer {eth0 n3}
}
node n13 {
type host
network-config {
hostname host2
!
interface eth0
mac address 42:00:aa:00:00:0c
ip address 45.45.45.2/21
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
!
ip route 0.0.0.0/0 45.45.45.253
!
}
canvas c0
iconcoords {840 552}
labelcoords {840 588}
interface-peer {eth0 n3}
}
node n2 {
type lanswitch
network-config {
hostname switch3
!
}
canvas c0
iconcoords {648 72}
labelcoords {648 95}
interface-peer {e1 n11}
interface-peer {e0 n9}
}
node n3 {
type lanswitch
network-config {
hostname switch4
!
}
canvas c0
iconcoords {648 456}
labelcoords {648 479}
interface-peer {e1 n12}
interface-peer {e2 n13}
interface-peer {e3 n4}
interface-peer {e0 n9}
}
node n9 {
type host
network-config {
hostname GW2
!
interface eth2
mac address 42:00:aa:00:00:06
ip address 45.45.45.254/21
!
interface eth1
mac address 42:00:aa:00:00:05
ip address 172.16.3.254/24
!
interface eth0
mac address 42:00:aa:00:00:04
ip address 172.16.2.254/24
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
canvas c0
iconcoords {648 216}
labelcoords {648 252}
interface-peer {eth0 n1}
custom-configs {
custom-config-id default {
custom-command /bin/sh
config {
ip addr add 127.0.0.1/8 dev lo0
ip addr add 172.16.2.254/24 dev eth0
ip addr add 172.16.3.254/24 dev eth1
ip addr add 45.45.45.254/21 dev eth2
ip -6 addr add ::1/128 dev lo0
ip route add 0.0.0.0/0 via 45.45.45.253
iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to-source 45.45.45.254
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.3.254
iptables -A FORWARD -i eth2 -d 172.16.2.10 -p tcp --dport 21 -j ACCEPT
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 21 -j DNAT --to-destination 172.16.2.10
rpcbind
inetd
}
}
}
interface-peer {eth1 n2}
interface-peer {eth2 n3}
custom-enabled true
custom-selected default
}
node n14 {
type host
network-config {
hostname host
!
interface eth0
ip address 172.16.2.10/24
mac address 42:00:aa:00:00:0f
!
interface lo0
type lo
ip address 127.0.0.1/8
ipv6 address ::1/128
!
}
auto_default_routes enabled
canvas c0
iconcoords {456 72}
labelcoords {456 108}
services {ftp}
interface-peer {eth0 n1}
}
link l0 {
nodes {n0 n6}
bandwidth 0
}
link l1 {
nodes {n1 n6}
bandwidth 0
}
link l2 {
nodes {n7 n0}
bandwidth 0
}
link l3 {
nodes {n8 n1}
bandwidth 0
}
link l7 {
nodes {n5 n4}
bandwidth 0
}
link l8 {
nodes {n10 n5}
bandwidth 0
}
link l9 {
nodes {n12 n3}
bandwidth 0
}
link l10 {
nodes {n13 n3}
bandwidth 0
}
link l11 {
nodes {n4 n3}
bandwidth 0
}
link l12 {
nodes {n11 n2}
bandwidth 0
}
link l4 {
nodes {n9 n1}
bandwidth 0
}
link l5 {
nodes {n2 n9}
bandwidth 0
}
link l6 {
nodes {n3 n9}
bandwidth 0
}
link l13 {
nodes {n14 n1}
bandwidth 0
}
canvas c0 {
name {Canvas0}
}
option show {
interface_names yes
ip_addresses yes
ipv6_addresses yes
node_labels yes
link_labels yes
background_images no
annotations yes
hostsAutoAssign no
grid yes
iconSize normal
zoom 1.0
}

4
SCR3.2/TP04/ddns.key Normal file
View File

@@ -0,0 +1,4 @@
key "tp.scr-key" {
algorithm hmac-md5;
secret "isfoZ1noj0MAJUxImFn1ZQ==";
};

View File

@@ -0,0 +1,16 @@
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.11 192.168.1.254;
option domain-name "tp.scr";
option domain-name-servers 192.168.1.158;
option routers 192.168.1.10;
default-lease-time 600;
max-lease-time 7200;
zone tp.scr.
{
primary 192.168.1.158;
}
zone 1.168.192.in-addr.arpa.
{
primary 192.168.1.158;
}
}

View File

@@ -3,7 +3,7 @@
;
$TTL 604800
@ IN SOA osiris.tp.scr. root.tp.scr. (
2 ; Serial
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@@ -11,7 +11,4 @@ $TTL 604800
;
@ IN NS osiris.tp.scr.
osiris.tp.scr. IN A 192.168.1.158
eno.tp.scr. IN A 192.168.1.1
owt.tp.scr. IN A 192.168.1.2
eerht.tp.scr. IN A 192.168.1.3
ruof.tp.scr. IN A 192.168.1.4
isis.tp.scr. IN A 192.168.1.10

View File

@@ -3,7 +3,7 @@
;
$TTL 604800
@ IN SOA osiris.tp.scr. root.tp.scr. (
1 ; Serial
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@@ -11,7 +11,4 @@ $TTL 604800
;
@ IN NS osiris.tp.scr.
158.1.168.192.in-addr.arpa IN PTR osiris.tp.scr.
1.1.168.192.in-addr.arpa IN PTR eno.tp.scr.
2.1.168.192.in-addr.arpa IN PTR owt.tp.scr.
3.1.168.192.in-addr.arpa IN PTR eerht.tp.scr.
4.1.168.192.in-addr.arpa IN PTR ruof.tp.scr.
10.1.168.192.in-addr.arpa IN PTR isis.tp.scr.

View File

@@ -1,19 +1,31 @@
//
// Do any local configuration here
//
include "/etc/bind/ddns.key";
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//SANS CLE
zone "tp.scr"
{
type master;
file "/etc/bind/db.tp.scr";
type master;
file "/etc/bind/db.tp.scr";
allow-update { 192.168.1.10; };
};
zone "1.168.192.in-addr.arpa"
{
type master;
file "/etc/bind/db.tp.scr.inv";
allow-update { 192.168.1.10; };
};
//Avec CLE
zone "tp.scr"
{
type master;
file "/var/cache/bind/db.tp.scr";
allow-update { key "tp.scr-key"; };
};
zone "1.168.192.in-addr.arpa"
{
type master;
file "/etc/bind/db.tp.scr.inv";
};
type master;
file "/var/cache/bind/db.tp.scr.inv";
allow-update { key "tp.scr-key"; };
};