sv:configuration_routeur

Configuration routeur/passerelle

Nom de machine : gwsio1, gwsio2, …

  • mc, vim, lynx, links
  • tcpdump, nmap
  • isc-dhcp-server
  • ssh
  • rsync
  • bind9, bind9-doc
  • ntp
  • vsftpd
  • git-core, etckeeper

Pour les installer, lancer la commande suivante :

aptitude install mc vim lynx links tcpdump nmap isc-dhcp-server ssh rsync bind9 bind9-doc ntp vsftpd git-core etckeeper
  • 2 interfaces :
    • une pour le réseau public : 10.121.38.10 (ou 20, 30, 40 ou 50 selon le groupe)
    • une pour le réseau privé : 192.168.0.1
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
   address 10.121.38.10
   netmask 255.255.255.0
   gateway 10.121.38.254
   up /root/nat.sh
   

allow-hotplug eth1
iface eth1 inet static
   address 192.168.0.1
   netmask 255.255.255.0
127.0.0.1 localhost
10.121.38.10 gwsio1.ldij-lecastel.lan gwsio1
192.168.0.1  gwsio1.ldij-lecastel.lan gwsio1
search ldij-lecastel.lan
nameserver 127.0.0.1
#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#version standard avec PXE local et sans LTSP
option domain-name-servers 192.168.0.1;
option domain-name "ldij-lecastel.lan";
default-lease-time 86400;
max-lease-time 604800;
authoritative;


subnet 192.168.0.0 netmask 255.255.255.0 {
        range 192.168.0.30 192.168.0.40;
        # filename "/ltsp/i386/pxelinux.0";
        # next-server 192.168.0.41;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.0.255;
        option routers 192.168.0.1;
 	# option root-path "/opt/ltsp/i386";
}
options {
	directory "/var/cache/bind";

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	 forwarders { # les serveurs DNS du lycee
	 	10.121.32.22;
		10.121.32.9;
	 };

	auth-nxdomain no;    # conform to RFC1035
	listen-on-v6 { any; };
};
  1. ifconfig pour obtenir la confiquration des interfaces (eth0 en 10.121.38.x et eth1 en 192.168.0.1)
  2. mii-tool permet de vérifier la connexion des câbles
  3. route -n permet d'obtenir la table de routage (route par defaut : 10.121.38.254)
  4. ping 10.121.38.254 permet de vérifier la connectivité vers la passerelle
  5. host lemonde.fr permet de tester la résolution de noms
  • sv/configuration_routeur.txt
  • Dernière modification : 2011/10/13 21:43
  • de 127.0.0.1