Bonjour,
voilà le problème j'essaie de configurer une Debian en routeur.
Pour ce faire j'ai tenté la méthode suivante qui fonctionne à moitié puisque le sous sous-réseau à accès à internet mais plus le routeur bien que network manager me dit être connecté.
La configuration physique :
BOX_adsl (=mode routeur restant activé) <---> eth0_ROUTEUR-DEBIAN_eth1 <---> CLIENT1
|
|
CLIENT2
Pour le ROUTEUR-DEBIAN,
/etc/network/interfaces:
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0:0
iface eth0:0 inet manual
auto eth1
iface eth1 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth1 eth0:0
Puis j'ai dé-commenté la ligne net.ipv4_forward=1 du fichier /etc/sysctl.conf
Puis iptables :
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Puis j'ai redémarré : /etc/init.d/networking start
Ça donne cela pour ifconfig du routeur-debian :
br0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet adr:192.168.0.26 Bcast:192.168.0.255 Masque:255.255.255.0
adr inet6: fe80::213:21ff:fecb:d691/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2177 errors:0 dropped:0 overruns:0 frame:0
TX packets:534 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:131001 (127.9 KiB) TX bytes:80448 (78.5 KiB)
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet adr:192.168.0.14 Bcast:192.168.0.255 Masque:255.255.255.0
adr inet6: fe80::250:daff:fe66:573b/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13846 errors:0 dropped:0 overruns:1 frame:0
TX packets:12006 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:10781257 (10.2 MiB) TX bytes:2237746 (2.1 MiB)
Interruption:22 Adresse de base:0x2000
eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10969 errors:0 dropped:0 overruns:0 frame:0
TX packets:13108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:2101636 (2.0 MiB) TX bytes:10769661 (10.2 MiB)
Interruption:19
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:16436 Metric:1
RX packets:806 errors:0 dropped:0 overruns:0 frame:0
TX packets:806 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:182818 (178.5 KiB) TX bytes:182818 (178.5 KiB)
Pour CLIENT1, /etc/network/interfaces :
# The loopback network interface
auto lo
iface lo inet loopback
Tous les clients ont accès à internet sans problème. Mais le PC-routeur Debian ne parvient pas à accéder à internet, via un navigateur. Pourtant
Un ping sur l'IP du client1
ping 192.168.0.23
PING 192.168.0.23 (192.168.0.23) 56(84) bytes of data.
64 bytes from 192.168.0.23: icmp_req=1 ttl=64 time=0.260 ms
64 bytes from 192.168.0.23: icmp_req=2 ttl=64 time=0.162 ms
64 bytes from 192.168.0.23: icmp_req=3 ttl=64 time=0.156 ms
64 bytes from 192.168.0.23: icmp_req=4 ttl=64 time=0.137 ms
^C
--- 192.168.0.23 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.137/0.178/0.260/0.050 ms
Et un ping sur le client2 a l'air bien aussi :
ping 192.168.0.22
PING 192.168.0.22 (192.168.0.22) 56(84) bytes of data.
64 bytes from 192.168.0.22: icmp_req=1 ttl=64 time=0.306 ms
64 bytes from 192.168.0.22: icmp_req=2 ttl=64 time=0.187 ms
64 bytes from 192.168.0.22: icmp_req=3 ttl=64 time=0.170 ms
^C
--- 192.168.0.22 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.170/0.221/0.306/0.060 ms
Qu'est-ce qui pourrait bloquer au niveau du navigateur du routeur-debian ?
Merci d'avance
Dernière modification par Hypathie (29-09-2014 16:26:24)