View previous topic :: View next topic |
Author |
Message |
maruscya Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 13 Aug 2004 Posts: 507
|
Posted: Mon May 30, 2005 2:06 pm Post subject: Amule, Routing |
|
|
Ciao a tutti...
Forse sono un po' OT, nel caso non cazziatemi
Ho due schede di rete collegate a due network diversi, vorrei fare in modo che il traffico creato da emule sia indirizzato non sul normale gateway di defualt, ma vorre forzarlo su una scheda ben precisa.
Ora tutto il traffico esce dalla solita eth0, e viene indirizzato il traffico verso il default gateway. Con l'uso di qualche regola di iptable dovrebbe essere possibile mandare il traffico sulla scheda ath0 e quindi verso il gateway di defualt di questa scheda.
Ecco il problema, non so un cavolo di iptables ora provo a mettere giu' io due righe, ma se qualcuno mi aiuta mi fa un favore
MaruscyA |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
maruscya Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 13 Aug 2004 Posts: 507
|
Posted: Mon May 30, 2005 2:55 pm Post subject: Re: Amule, Routing |
|
|
Sempre io...
Dando un' occhiata al man di iptables, ora mi vengon in mente un paio di domande.... In quale catena devo scrivere le regole ?
Sono Arrivato piu' o meno a questo punto
Code: |
iptables -A OUTPUT -t mangle -s 10.101.18.184 -d 0.0.0.0 -p tcp --sport 4661 -j ROUTE --oif ath0
|
Cosi tutti i pacchetti in uscita per la porta 4661, usata dal server che mi interessa, usa la scheda ath0. Ma ottengo questo bel messaggio
Code: |
$ iptables -A OUTPUT -t mangle -s 10.101.18.184 -d 0.0.0.0 -p tcp --sport 4661 -j ROUTE --gw 213.255.44.254
iptables v1.2.11: Unknown arg `--gw'
Try `iptables -h' or 'iptables --help' for more information.
|
Domande
1- e' giusto quello che ho scritto ??
2- Da dove esce l'errore ??
Grazie mille come al solito |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
neryo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Funny_Figure/klo.gif)
Joined: 09 Oct 2004 Posts: 1292 Location: Ferrara, Italy, Europe
|
Posted: Mon May 30, 2005 3:41 pm Post subject: Re: Amule, Routing |
|
|
maruscya wrote: |
1- e' giusto quello che ho scritto ??
2- Da dove esce l'errore ??
Grazie mille come al solito |
mh non e' giusto...devi fare un prerouting su ogni porta su cui lavora il mulo... in questo modo
Code: |
IFACE=eth0 #setta la tua interfaccia collegata ad internet
PORT1= #qui setti le porte su cui lavora il mulo
PORT2=
MULOIP= #qui l ip del pc con il mulo
iptables -t nat -A PREROUTING -p udp -i $IFACE --dport $PORT1 -j DNAT --to-destination ${MULOIP}:${PORT1}
iptables -t nat -A PREROUTING -p udp -i $IFACE --dport $PORT2 -j DNAT --to-destination ${MULOIP}:${PORT2}
|
ciao _________________ cache: a safe place for hiding or storing things..
D-link DWL-G650 AirPlus
Apache Php Mysql |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|