Salut,
J'ai rémonté un routeur depuis Une Ubuntu :
# cat /etc/network/interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
#auto eth1
#iface eth1 inet dhcp
# local network
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
# broadcast 192.168.0.255
# gateway 192.168.0.1
up route add -host 192.168.0.1/32 eth1
# route
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
cchartreuse * 255.255.255.255 UH 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
82.243.255.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth1
default 82.243.255.254 0.0.0.0 UG 100 0 0 eth0
J'ai ajouté le script d'Olivier pour faire le nat :
# iptables -L -n -v
Chain INPUT (policy DROP 6 packets, 315 bytes)
pkts bytes target prot opt in out source
destination
0 0 ACCEPT all -- lo * 0.0.0.0/0
0.0.0.0/0
0 0 ACCEPT all -- eth1 * 192.168.0.0
192.168.0.1
0 0 ACCEPT all -- eth1 * 192.168.0.255
192.168.0.1
696 673K ACCEPT all -- eth0 * 0.0.0.0/0
82.XXXXXX state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0
82.XXXXXXXX tcp dpt:22 state NEW,ESTABLISHED
6 315 ULOG all -- * * 0.0.0.0/0
0.0.0.0/0 ULOG copy_range 0 nlgroup 1 prefix `Netfilter'
queue_threshold 1
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
0 0 ACCEPT tcp -- eth0 eth1 0.0.0.0/0
192.168.0.0 tcp dpt:80 state NEW,RELATED,ESTABLISHED,UNTRACKED
0 0 ACCEPT tcp -- eth1 eth0 192.168.0.0
0.0.0.0/0 tcp spt:80 state RELATED,ESTABLISHED
0 0 ACCEPT all -- eth1 eth0 192.168.0.0
0.0.0.0/0 state NEW,RELATED,ESTABLISHED,UNTRACKED
0 0 ACCEPT all -- eth0 eth1 0.0.0.0/0
192.168.0.0 state RELATED,ESTABLISHED
Chain OUTPUT (policy DROP 12 packets, 759 bytes)
pkts bytes target prot opt in out source
destination
0 0 ACCEPT all -- * lo 0.0.0.0/0
0.0.0.0/0
0 0 ACCEPT all -- * eth1 192.168.0.1
192.168.0.0
0 0 ACCEPT all -- * eth1 192.168.0.1
192.168.0.255
664 115K ACCEPT all -- * eth0 82.243.255.72
0.0.0.0/0 state NEW,RELATED,ESTABLISHED,UNTRACKED
12 759 ULOG all -- * * 0.0.0.0/0
0.0.0.0/0 ULOG copy_range 0 nlgroup 1 prefix `Netfilter'
queue_threshold 1
J'ai installé un serveur dhcp qui écoute sur l'interface eth1 : il
m'envoie bien une adresse IP (extratit du lease)
lease 192.168.0.32 {
starts 6 2008/07/12 09:25:21;
ends 6 2008/07/12 09:35:21;
binding state active;
next binding state free;
hardware ethernet 00:11:09:66:da:df;
client-hostname "chartreuse";
}
mais ensuite
# ping 192.168.0.32
PING 192.168.0.32 (192.168.0.32) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
--- 192.168.0.32 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2008ms
Ça m'énerve car je ne comprends pas pourquoi... c'est encore un coup
d'Ubuntu où bien j'ai fait une boulette et je ne la vois pas ?
Merci du coup de main,
PK
--
|\ _,,,---,,_ Patrice KARATCHENTZEFF
ZZZzz /,`.-'`' -. ;-;;,_
mailto:p.karatchentzeff@free.fr
|,4- ) )-,_. ,\ ( `'-'
http://p.karatchentzeff.free.fr
'---''(_/--' `-'\_)