aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: configure amuled and iptables for tow machines  (Read 3531 times)

fbnsantos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
configure amuled and iptables for tow machines
« on: September 13, 2005, 10:40:55 AM »

Hello,

I need help to configure iptables of my server! the idea is put on server runing amuled and in another pc (one or more if possible) the another client emule, can anyone help-me on this??? the problem is with the important port's ? how I can test the ports on server ? And what i must fix below for work like this?
 
I have on my server/router linux fedora 3 with apache, iptables....

EXTERNAL=eth0
INTERNAL=eth1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "Setting up NAT (Network Address Translation)..."
# by default, nothing is forwarded.
iptables -F
iptables -P FORWARD ACCEPT
# Allow all connections OUT and only related ones IN
iptables -A FORWARD -i $EXTERNAL -o $INTERNAL -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTERNAL -o $EXTERNAL -j ACCEPT
# enable MASQUERADING
iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE


iptables -A INPUT -p tcp --dport 4661 -j ACCEPT
iptables -A INPUT -p udp --dport 4661 -j ACCEPT
iptables -A INPUT -p tcp --dport 4662 -j ACCEPT
iptables -A INPUT -p udp --dport 4665 -j ACCEPT
iptables -A INPUT -p udp --dport 4672 -j ACCEPT


iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 4661 -j DNAT --to 192.168.0
.11:4661
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 4662 -j DNAT --to 192.168.0
.11:4662
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 4665 -j DNAT --to 192.168.0
.11:4665
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 4672 -j DNAT --to 192.168.0
.11:4672


Many thanks,
Filipe Santos
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: configure amuled and iptables for tow machines
« Reply #1 on: September 13, 2005, 10:44:29 AM »

Have you changed the Ports on the server? [e.g. to 6662TCP + 6665/6672UDP] Unless you won't get a HighID on both PCs.
Logged

fbnsantos

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
thanks it works:)
« Reply #2 on: September 13, 2005, 12:36:16 PM »

Thanks wuischke it works fine ;)
Logged