I have set up a linux box to be a router for my home lan.
Since I have a single lan card on the router I connected both router and
modem to an hub. I know that it is not the right way to use it, but it
works for almost all.
so I have pc1, pc2, linux-router and modem connected to hub. linux-router
(192.168.0.10) is the default gateway.it have eth0 and when connected to
the internet also ppp0. pc1 is linux (192.168.0.2) with eth0. pc2 is win98
(dhcp).
It works fine except for emule (and amule/xmule, same problems).
If you know how emule works you know that it needs to be reachable on port
4662/tcp (default) 4665/tcp and 4672/udp. So I set these lines in
rc.inet1 script:
iptables -t nat -A PREROUTING -p tcp --dport 4662 -j DNAT --to-destination
192.168.0.2:4662
iptables -t nat -A PREROUTING -p tcp --dport 4665 -j DNAT --to-destination
192.168.0.2:4665
iptables -t nat -A PREROUTING -p udp --dport 4672 -j DNAT --to-destination
192.168.0.2:4672
In this way I get high id with emule, but I get very few sources for files
in download. Tested with many files with many sources but always the same
behaviour.
Since everything else works fine, I doubt that the problem is that
everything is connected to the hub, but since I cannot chat (dont kave
another lan card, I ask if u think that it is the problem.
Maybe the iptables lines i'm using are wrong?
Please help.
Francesco
|