Suite à un précédent topic ( http://forums.archlinux.fr/topic10065-20.html ), benjarobin m'a conseillé de me servir de mon PC de bureau pour partager ma connexion Internet, aux périphériques (sous Debian) connectés en aval.
Actuellement mon PC est connecté à Internet via wlan0 en DHCP. Les périphériques sont connectés en Ethernet au PC de bureau (eth0) avec IP fixe.
Voici un schéma explicatif:
Code : Tout sélectionner
192.168.1.1 wlan0 eth0 eth0 (du PC2)
LIVEBOX <=============> PC BUREAU <=====================> PC 2
DHCP 192.168.2.40 192.168.2.50
De mon PC2 (ssh), ping 192.168.2.40: OK
J'ai suivi ces procédures: http://forums.archlinux.fr/topic9924.html et https://wiki.archlinux.org/index.php/Internet_Share avec Iptables, route add, etc.
Voici les informations:
Ifconfig (PC Bureau)
Code : Tout sélectionner
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet 192.168.2.40 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::22cf:30ff:fe6f:c02d prefixlen 64 scopeid 0x20<link>
ether 20:cf:30:6f:c0:2d txqueuelen 1000 (Ethernet)
RX packets 759 bytes 103075 (100.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 980 bytes 96568 (94.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 44 base 0x2000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 64 bytes 4880 (4.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 64 bytes 4880 (4.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet 192.168.1.14 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::e246:9aff:fe1c:2005 prefixlen 64 scopeid 0x20<link>
ether e0:46:9a:1c:20:05 txqueuelen 1000 (Ethernet)
RX packets 23508 bytes 6992987 (6.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18058 bytes 2846676 (2.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Code : Tout sélectionner
/etc/network/interfaces
iface eth0 inet static
address 192.168.2.50
netmask 255.255.255.0
gateway 192.168.2.40
Code : Tout sélectionner
/etc/resolv.conf
nameserver 192.168.1.1
Code : Tout sélectionner
route add default gw 192.168.2.40 eth0
2nde question: Je n'arrive pas à obtenir d'accés à Internet du PC2, alors que j'ai appliqué les tutos correctement. J'ai besoin d'un petit coup de pouce.
Demandez-moi plus d'infos si besoin est.
Cordialement.