aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: bind address and NAT  (Read 3804 times)

k0stek

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
bind address and NAT
« on: May 24, 2009, 05:36:58 PM »

Since I've upgraded to 2.2.5 it brakes my shaping scripts. I've found usefull option called "bind address"

Situation:
Amule is running on local computer with local ip 192.168.1.250, I've added second to ethernet 192.168.1.249.
I've set up bind address to 192.168.1.249. From local network I can see ports are open on 192.168.1.249 but when I try to connect
from net it's not working. All ports needed to gain high id are forwarded using simpled method like this:

$IPT -A FORWARD -p tcp -i $INET_IFACE --destination-port 4662 \
     --destination 192.168.1.249 -j ACCEPT

$IPT -t nat -A PREROUTING -p tcp -i $INET_IFACE --destination-port 4662 \
     -j DNAT --to-destination 192.168.1.249

Can bind address be local one ?
Is NAT a problem?

Best regards
k0stek
Logged

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524
Re: bind address and NAT
« Reply #1 on: May 25, 2009, 09:31:03 PM »

NAT should be no problem. I have NAT  turned on on a wifi router and it works like a charm.
How well are you skilled when it comes to configuring your iptables firewall?

I am sure you didn't post the whole firewall script. But I used to enable NAT by a rule similar to this:
Code: [Select]
iptables -t nat -A POSTROUTING -o $INET_IFACE -j MASQUERADE
Also check your default policy, it might be dropping things.
Check your iptables stats using "iptable -vnL" and see what you get regarding blocked packets.
Logged

k0stek

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: bind address and NAT
« Reply #2 on: May 26, 2009, 02:13:00 PM »

I'm sure that iptables rules are fine, I've made change to forwarding ports from 192.168.1.250 to 192.168.1.249.
I'll double check it today...
Logged