Mon down.sh :
#!/bin/bash
/etc/openvpn/stoptorrent
killall openvpn
loip="192.168.0.1"
vpnport="443"
tcpopenport="23951,21829,20796,28112,28308,28628"
udpopenport="23951,21829,20796,28116"
iptables -D PREROUTING -t nat -i tun0 -p tcp --dport $vpn -j DNAT --to $loip
iptables -D PREROUTING -t nat -i tun0 -p udp --dport $vpn -j DNAT --to $loip
iptables -D POSTROUTING -t nat -o tun0 -j MASQUERADE
iptables -D INPUT -i tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -D SERVICES -p tcp -m multiport --dports $tcpopenport -j ACCEPT
iptables -D SERVICES -p udp -m multiport --dports $udpopenport -j ACCEPT
iptables -D FORWARD -s $loip/32 -o eth0 -j DROP
iptables -D SERVICES
ip rule del from $4/32 table VPN
ip rule del from $loip/32 table VPN
ip route del default dev tun0 table VPN
Mon starttorrent :
#!/bin/bash
/etc/init.d/rtord1 restart
/etc/init.d/rtord2 restart
/etc/init.d/rtord3 restart
/etc/init.d/mldonkey-server restart
etc/openvpn/checkvpn &
Mon stoptorrent :
#!/bin/bash
/etc/init.d/rtord1 stop
/etc/init.d/rtord2 stop
/etc/init.d/rtord3 stop
/etc/init.d/mldonkey-server stop
killall mlnet
KILLALL checkvpn
Si ça peut t'aider...mldonkey c'est pour emule (très peu utilisé, on trouve tout en torrent...); j'avais essayé avec amule, mais impossible à binder !!! ou du moins je n'ai pas réussi.