This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Azureus Problem (DNAT, Packet Filtering)

Hi there,

This problem has been driving me crazy, but I cannot connect to any peers, I have researched this problem in depth reading quite a few posts and trying different configurations however the only success I have had has been getting a confirmation that the port is open and NAT is directing it.

Definitions
Torrent In (Dest: 56881 Source: 1:65535) TCP/UDP
Torrent Out (Dest: 1:65535 Source: 56881) TCP/UDP

Network: 
PC running Azureus: 192.168.1.10 (Statically Assigned to MAC by DHCP)

NAT
Name: Torrent
Traffic Source: Any
Traffic Service: Torrent In (Dest: 56881 Source: 1:65535)
Traffic Dest: External (WAN) (Address)

NAT Mode: DNAT
Destination: PC running Azureus
Dest Service: (Nothing)


Packet Filter
Source: Any
Service: Torrent In (Dest: 56881 Source: 1:65535)
Dest: PC running Azureus
Action: Allow
Time Event: Always

Those are the settings I currently have and Azureus is set up to listen on 56881, however no peers can be connected but NAT reports as fine.

The packet filter log reports this while Azureus is running, in great quantity. I have set up PC to (Bind to local port) to 56881 before I did this the port was random in the ranges of 3000 - 4000. Should the dstip peers not be connecting on port 56881, not their own port?

 
2009:05:07-15:56:52  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" seq="0" initf="eth1" outitf="eth1" dstmac="00:13:20:a9:6c:97" srcmac="00:a0:cc:24:ff:a1" srcip="192.168.1.10" dstip="24.154.216.11" proto="6" length="48" tos="0x00" prec="0x00" ttl="127" srcport="56881" dstport="32924" tcpflags="SYN" 
2009:05:07-15:56:54  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" seq="0" initf="eth1" outitf="eth1" dstmac="00:13:20:a9:6c:97" srcmac="00:a0:cc:24:ff:a1" srcip="192.168.1.10" dstip="24.154.216.11" proto="6" length="48" tos="0x00" prec="0x00" ttl="127" srcport="56881" dstport="32924" tcpflags="SYN" 
2009:05:07-15:56:54  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" seq="0" initf="eth1" outitf="eth1" dstmac="00:13:20:a9:6c:97" srcmac="00:a0:cc:24:ff:a1" srcip="192.168.1.10" dstip="72.0.219.171" proto="6" length="48" tos="0x00" prec="0x00" ttl="127" srcport="56881" dstport="32400" tcpflags="SYN" 
2009:05:07-15:56:55  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" seq="0" initf="eth1" outitf="eth1" dstmac="00:13:20:a9:6c:97" srcmac="00:a0:cc:24:ff:a1" srcip="192.168.1.10" dstip="77.31.192.6" proto="6" length="48" tos="0x00" prec="0x00" ttl="127" srcport="56881" dstport="49550" tcpflags="SYN" 
2009:05:07-15:56:57  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" seq="0" initf="eth1" outitf="eth1" dstmac="00:13:20:a9:6c:97" srcmac="00:a0:cc:24:ff:a1" srcip="192.168.1.10" dstip="77.31.192.6" proto="6" length="48" tos="0x00" prec="0x00" ttl="127" srcport="56881" dstport="49550" tcpflags="SYN" 
2009:05:07-15:56:57  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60002" seq="0" initf="eth1" outitf="eth1" dstmac="00:13:20:a9:6c:97" srcmac="00:a0:cc:24:ff:a1" srcip="192.168.1.10" dstip="220.233.29.99" proto="6" length="48" tos="0x00" prec="0x00" ttl="127" srcport="56881" dstport="38915" tcpflags="SYN" 


Can anybody help please?


This thread was automatically locked due to age.
Parents
  • Just to add to this I have found that when I change the packet filter rule from

    Packet Filter
    Source: Any
    Service: Torrent In (Dest: 56881 Source: 1:65535)
    Dest: PC running Azureus
    Action: Allow
    Time Event: Always

    TO

    Packet Filter
    Source: PC running Azureus
    Service: Any
    Dest: Any
    Action: Allow
    Time Event: Always

    It will work, but this does not seem ideal because it will allow any service. Can anyone help?
  • Try
    Packet Filter
    Source: PC running Azureus
    Service: Torrent Out
    Dest: Any
    Action: Allow
    Time Event: Always
  • Haha, I was hoping somone would say that because reading through my problem I thought it might work and it did, however I wasnt sure because I was skeptical since for security isnt that creating a security breach?
  • Is there a way to use bittorrent without creating a security breach? [;)] I don't really know any tricks because I don't use it.

    Cheers - Bob
  • lol. Well what I really want to know is that only allowing External clients on Any:Any socket into 192.168.1.10:56881 socket and only that socket and computer?

    Also thanks for your help, I really appreciate it [:)]

    P.S. Oh btw I added your idea, I didnt replace the other packet filter rule. So I now have two packet filter rules
    Any > Torrent In > PC
    PC > Torrent Out > Any
  • Ok, I have what I think to be a new problem.

    The only rule I have now is a packet rule

    PC > Torrent Out > Any

    and I can successfully connect to tracker/peers and download/upload over Azureus, however there is now no NAT rule and when I test NAT i get "Testing port 56881 ... 
    NAT Error - Connect attempt to (My External IP):56881 (your computer) timed out after 20 seconds. This means your port is probably closed."

    I am also getting spammed with connection attempts in packet filter log

    2009:05:07-17:55:21  ulogd[3116]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60001" seq="0" initf="eth0" outitf="eth0" dstmac="00:a0:cc:24:ff:a1" srcmac="00:00:00:00:00:00" srcip="67.213.71.130" dstip="(My Ip)" proto="6" length="64" tos="0x00" prec="0x00" ttl="48" srcport="41220" dstport="56881" tcpflags="SYN" 


    Why is this happening?
  • Haha, I was hoping somone would say that because reading through my problem I thought it might work and it did, however I wasnt sure because I was skeptical since for security isnt that creating a security breach?


    Which rule are you referring to?

    Are you worried about outbound traffic or only about inbound?

    Barry
  • Which rule are you referring to?

    Are you worried about outbound traffic or only about inbound?

    Barry


    Ah the mysterious BarryG lol, I have read a lot of posts made by you regarding similar problems, thats how I got this far with the rules. 

    But anyways, I can run this rule on its own with not NAT configuration or any other packet filter rules. If you read the post before yours I explained the problem I am having now. I need an explanation on basically what ports are available from outside my LAN and effectively i'd like to just understand through which ports outside users can connect and which ports I can connect out through, and if a port is open one way then wont somone be able to connect through it from the other direction. Thanks

    Packet Filter
    Source: PC running Azureus
    Service: Torrent Out
    Dest: Any
    Action: Allow
    Time Event: Always

    Effectively the only rule I have now is PC > Torrent Out > Any
    So only I can connect out and no one can connect in, however I am able to connect to peers and download/upload as normal, how can this be? I do get flooded with SYN requests from (Client)[:(]Client Port) > (My Ip):56881 but I can download, too me this seems more secure because I did an independant port scan and it reported the port did not respond (Stealth).
Reply
  • Which rule are you referring to?

    Are you worried about outbound traffic or only about inbound?

    Barry


    Ah the mysterious BarryG lol, I have read a lot of posts made by you regarding similar problems, thats how I got this far with the rules. 

    But anyways, I can run this rule on its own with not NAT configuration or any other packet filter rules. If you read the post before yours I explained the problem I am having now. I need an explanation on basically what ports are available from outside my LAN and effectively i'd like to just understand through which ports outside users can connect and which ports I can connect out through, and if a port is open one way then wont somone be able to connect through it from the other direction. Thanks

    Packet Filter
    Source: PC running Azureus
    Service: Torrent Out
    Dest: Any
    Action: Allow
    Time Event: Always

    Effectively the only rule I have now is PC > Torrent Out > Any
    So only I can connect out and no one can connect in, however I am able to connect to peers and download/upload as normal, how can this be? I do get flooded with SYN requests from (Client)[:(]Client Port) > (My Ip):56881 but I can download, too me this seems more secure because I did an independant port scan and it reported the port did not respond (Stealth).
Children
  • BitTorrent will let you download even if you're blocking incoming downloaders, but it will be much slower than if you are sharing.

    Therefore, you should add a rule to allow incoming traffic to your Azureus port, e.g.

    Source: Any
    Service: Torrent In (Dest: 56881 Source: 1:65535)
    Dest: PC running Azureus
    Action: Allow
    Time Event: Always

    There is no security problem here as long as there is not a security hole in Azureus.

    Barry
  • Yeah, I have set it up so now I can test NAT and download fine. If you wouldn't mind just going over the settings and just checking that I have done it correctly I would appreciate it.

    Definitions
    Torrent In (Source: 1:65535 Dest: 56881 ) TCP/UDP
    Torrent Out (Source: 56882 Dest: 1:65535 ) TCP/UDP
    (I have my source port at 56882 (Bind to Local Port) so I changed it to 56882 for Torrent Out is this ok, it wasnt working with it set to 56881)

    Network:
    PC running Azureus: 192.168.1.10 (Statically Assigned to MAC by DHCP)

    NAT
    Name: Torrent
    Traffic Source: Any
    Traffic Service: Torrent In (Dest: 56881 Source: 1:65535)
    Traffic Dest: External (WAN) (Address)

    NAT Mode: DNAT
    Destination: PC running Azureus
    Dest Service: (Nothing)


    Packet Filters
    Source: Any
    Service: Torrent In (Source: 1:65535 Dest: 56881 ) 
    Dest: PC running Azureus
    Action: Allow
    Time Event: Always

    Source: PC running Azureus
    Service: Torrent Out (Source: 56882 Dest: 1:65535 ) 
    Dest: Any
    Action: Allow
    Time Event: Always


    With these settings it appears to work although Port 56881 is reported OPEN and Port 56882 is reported Stealth (Non-existant)
  • Looks fine.

    The only thing I'd recommend is to next setup QOS for both the IN and OUT torrent services.

    Barry
  • This post (and the one from BarryG) has been incredibly useful to me!
    Thanks for that!

    However, isn't it useless to make a packet filter from any->internal pc ?

    As you already have a DNAT doing this?

    And how can a packet filter to your internal pc work, as the traffic coming in doesn't even "know" it has to go that pc, up until your DNAT rule tells it to?

    Maybe i see it wrong, but please explain to me, as i'm quite new to DNAT and packet filters.

    Thanks in advance!
  • No because even thoguh DNAT is telling any packets heading to my external IP to go to my local PC, they are still filtered going to my Local PC

    So if we look through this step by step

    First step is the external client trying to connect and they connect to my external IP, the packets are not filtered up to here.

    ExternalIP:34567 > External IP:56881

    Next step is the NAT redirects the Packet to my local PC without client knowing they are being redirected, now at this point a packet filtering comes into play and stops any packets that it does not have rules for, as in pre set or whether the packet was requested.

    ExternalIP:34567 > Local PC IP:56881

    Basically the packet filtering works on the internal side of the network as a security guard, if the packet does not have authorization it will drop it. The NAT works on both sides as a receptionist which tells packets that are allowed to enter the network where to go, and if they are not drops them.


    "However, isn't it useless to make a packet filter from any->internal pc ?"


    You are also right and wrong about this, a rule to allow packets through is required however there is no needs for me to have an independant packet filtering rule to allow these packets to get to my Internal PC, infact I just removed it and set the "Automatic packet filter rule" for DNAT.

    Tried to explain it best I could, hope this helped.
  • I will see if it worked this evening [:)]

    I have the problem torrent works, but while i specified my µtorrent to use a specific port, i apparently get a lot of other requests that get dropped, because if i keep normal rules, speed only is about 30kbps, if i enable an any->any->any rule, the speed goes through the roof [;)] (300kbps easy and up).
  • You can look at the packetfilter log to see what else is getting dropped.

    Barry