Astaro User Bulletin Board
Go Back   Astaro User Bulletin Board > Astaro Gateway Products > Network Security: Firewall, NAT, QoS, IPS and more

Welcome to the Astaro User Bulletin Board.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2009, 11:24 PM
Member
 
Join Date: Nov 2008
Posts: 35
Question Bittorrent Client works, but...

My bittorrent client does work very well, but to achieve that I have to set the following packet filter rule:

Source: MyIP -> Service:Any -> Destination:Any
allways allowed

I had to define this rule cos the ASG had blocked all packets sending from myIP with random outgoing ports. And these connection seems to be needed for using the bittorrent network.
Reply With Quote
  #2 (permalink)  
Old 01-05-2009, 01:26 AM
Moderator
 
Join Date: Jul 2001
Location: southern California
Posts: 5,156
Default

Depending on the client, the SOURCE port may be predictable.

Barry
__________________
http://DealBert.net
Home & business end-user since v1.x
  • ASL 6.3x, HP DL145 Dual Opteron, 1GB RAM, 6 gigE NICs, 50-IP Platinum License
  • ASL 7.3x, Dell PE1550 Dual PIII 1GHz, 1GB RAM, 2 NICs, 50-IP Platinum License
  • ASL 7.5x, 17-watt fanless mini-ITX system: MSI IM-945GSE-A Atom n270, 2GB RAM, Morex T3310 case. 2 Intel GigE, 3 VLANs. 80G 5200rpm 2.5" HD
    Netgear GS108T gigE VLAN switch & Linksys WRT54G WAP
    Total network infrastructure: 27 watts. 100-IP Home User. FiOS 10mb/2mb
Reply With Quote
  #3 (permalink)  
Old 01-05-2009, 11:05 AM
Member
 
Join Date: Nov 2008
Posts: 35
Default

Predictable source port? how?

I think the outgoing port could be the port the other torrentusers have on thei clients. So I have to select almost every port above 1024?
Reply With Quote
  #4 (permalink)  
Old 01-06-2009, 05:51 AM
Moderator
 
Join Date: Jul 2001
Location: southern California
Posts: 5,156
Default

Each TCP connection has a SOURCE port and a DEST port.

If these are outgoing from your internal PC, then the SOURCE port is determined by the software or TCP stack on your PC; it is NOT the other user's port.

Therefore, if you BT client keeps it's outgoing connections on a single SOURCE port (or a range), you can create rules based upon that source port.

Vuze (nee Azureus), for example, makes all of it's outgoing connections on the same port you configure for incoming traffic.
e.g., I have it set for 56881, and I ran IPTraf, and I see all connections to my PC are to/from port 56881.

Therefore,
I have definitions for
TCP/UDP 1024:65535 → 56881
and
56881 → 1:65535

and I have PF rules (and NAT and QOS settings) to match.

Barry
__________________
http://DealBert.net
Home & business end-user since v1.x
  • ASL 6.3x, HP DL145 Dual Opteron, 1GB RAM, 6 gigE NICs, 50-IP Platinum License
  • ASL 7.3x, Dell PE1550 Dual PIII 1GHz, 1GB RAM, 2 NICs, 50-IP Platinum License
  • ASL 7.5x, 17-watt fanless mini-ITX system: MSI IM-945GSE-A Atom n270, 2GB RAM, Morex T3310 case. 2 Intel GigE, 3 VLANs. 80G 5200rpm 2.5" HD
    Netgear GS108T gigE VLAN switch & Linksys WRT54G WAP
    Total network infrastructure: 27 watts. 100-IP Home User. FiOS 10mb/2mb

Last edited by BarryG; 01-06-2009 at 05:58 AM.
Reply With Quote
  #5 (permalink)  
Old 01-06-2009, 12:02 PM
Member
 
Join Date: Nov 2008
Posts: 35
Default

Thanks a lot for your explanation :-)

I am using Transmission, and do not find any switches to adjust the portrange. It seems to be accidentally.
__________________
- ASG 7.402 Home License [FSC Futro S400; 1GB DDR; 1Ghz AMD Geode NX; 4 Nic D-Link DFE-580TX]
- ASG 7.402 Home License [ASG 110/120 1GB DDR]
- ASG 7.450 BETA Home License [FSC Futro S500; 1GB DDR2; 1Ghz AMD Sempron 2100+]
Reply With Quote
  #6 (permalink)  
Old 03-29-2009, 06:22 PM
Junior Member
 
Join Date: Mar 2009
Location: münster
Posts: 18
Default

Quote:
Originally Posted by BarryG View Post
Each TCP connection has a SOURCE port and a DEST port.

If these are outgoing from your internal PC, then the SOURCE port is determined by the software or TCP stack on your PC; it is NOT the other user's port.

Therefore, if you BT client keeps it's outgoing connections on a single SOURCE port (or a range), you can create rules based upon that source port.

Vuze (nee Azureus), for example, makes all of it's outgoing connections on the same port you configure for incoming traffic.
e.g., I have it set for 56881, and I ran IPTraf, and I see all connections to my PC are to/from port 56881.

Therefore,
I have definitions for
TCP/UDP 1024:65535 → 56881
and
56881 → 1:65535

and I have PF rules (and NAT and QOS settings) to match.

Barry
Hi Barry

could you please explain me howto configure the NAT rule and the pf rules?
i try some but it didn´t work for me

THX A LOT and regards
ACID25
Reply With Quote
  #7 (permalink)  
Old 03-29-2009, 08:31 PM
Super Moderator
 
Join Date: Feb 2009
Location: In a galaxy far far away
Posts: 857
Default

Quote:
Originally Posted by ACID25 View Post
Hi Barry

could you please explain me howto configure the NAT rule and the pf rules?
i try some but it didn´t work for me

THX A LOT and regards
ACID25
Hi ACID25

I am using utorrent and the NAT and PF will be the same (you have to change the ports and client ip that uses the torrent client)


Definitions:
------------
under network create client_A(basically the pc that uses the torrent )
Service: define the ports for utorrent (destination port :***x)


Packet Filter
--------
source :Any
service :utorrent
Destination: client_A

Nat
------
traffic source: Any
Traffic service :utorrent
traffic destination: external wan ip
Nat mode: DNAT
destination: client_A
destination service: nothing
automatic pf rule unchecked

Now if you configure the same but change the ports to the correct ones(i think bittorrent uses range of ports whereas utorrent uses one) and configure the client everything should work

hope that helps!
__________________

Running Astaro ASG virtual appliance | Home power user 100 IP license
Intel Dual Core 2.4GHz (800MHz) | 4GB (2 x 2GB) PC2-6400 800Mhz 5-5-5-18 | WD 160GB |3 x Intel Pro/1000
Reply With Quote
  #8 (permalink)  
Old 03-29-2009, 09:14 PM
Moderator
 
Join Date: Jul 2001
Location: southern California
Posts: 5,156
Default

Exactly as Wingman said.

It gets messier if you don't use a client that uses a single port for all torrents, so try to use one that does. Azureus/Vuze works fine for me, but uTorrent reportedly uses much less RAM.

However, Hans asked earlier about controlling outgoing traffic, so the outgoing rule could look like this:
source PC, service BitTorrentOUT, dest any, allow
where BitTorrentOUT is defined as
TCP/UDP
source port: port # you've configured in the client (e.g. 6881).
dest port 1024:65535

Barry
__________________
http://DealBert.net
Home & business end-user since v1.x
  • ASL 6.3x, HP DL145 Dual Opteron, 1GB RAM, 6 gigE NICs, 50-IP Platinum License
  • ASL 7.3x, Dell PE1550 Dual PIII 1GHz, 1GB RAM, 2 NICs, 50-IP Platinum License
  • ASL 7.5x, 17-watt fanless mini-ITX system: MSI IM-945GSE-A Atom n270, 2GB RAM, Morex T3310 case. 2 Intel GigE, 3 VLANs. 80G 5200rpm 2.5" HD
    Netgear GS108T gigE VLAN switch & Linksys WRT54G WAP
    Total network infrastructure: 27 watts. 100-IP Home User. FiOS 10mb/2mb

Last edited by BarryG; 03-29-2009 at 09:18 PM.
Reply With Quote
  #9 (permalink)  
Old 03-29-2009, 09:28 PM
Super Moderator
 
Join Date: Feb 2009
Location: In a galaxy far far away
Posts: 857
Default

Quote:
Originally Posted by BarryG View Post
Exactly as Wingman said.

It gets messier if you don't use a client that uses a single port for all torrents, so try to use one that does. Azureus/Vuze works fine for me, but uTorrent reportedly uses much less RAM.

However, Hans asked earlier about controlling outgoing traffic, so the outgoing rule could look like this:
source PC, service BitTorrentOUT, dest any, allow
where BitTorrentOUT is defined as
TCP/UDP
source port: port # you've configured in the client (e.g. 6881).
dest port 1024:65535

Barry
Barry I haven't defined outgoing traffic and utorrent works fine. Is it something that you have to configure?
__________________

Running Astaro ASG virtual appliance | Home power user 100 IP license
Intel Dual Core 2.4GHz (800MHz) | 4GB (2 x 2GB) PC2-6400 800Mhz 5-5-5-18 | WD 160GB |3 x Intel Pro/1000
Reply With Quote
  #10 (permalink)  
Old 03-29-2009, 09:43 PM
Moderator
 
Join Date: Jul 2001
Location: southern California
Posts: 5,156
Default

If you already have another rule for outgoing traffic (e.g. INT, ANY, ANY), then you're fine.
The original poster had asked though, so I wanted to make sure I covered that too.

Barry
__________________
http://DealBert.net
Home & business end-user since v1.x
  • ASL 6.3x, HP DL145 Dual Opteron, 1GB RAM, 6 gigE NICs, 50-IP Platinum License
  • ASL 7.3x, Dell PE1550 Dual PIII 1GHz, 1GB RAM, 2 NICs, 50-IP Platinum License
  • ASL 7.5x, 17-watt fanless mini-ITX system: MSI IM-945GSE-A Atom n270, 2GB RAM, Morex T3310 case. 2 Intel GigE, 3 VLANs. 80G 5200rpm 2.5" HD
    Netgear GS108T gigE VLAN switch & Linksys WRT54G WAP
    Total network infrastructure: 27 watts. 100-IP Home User. FiOS 10mb/2mb
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:03 AM.

 

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.


These pages are specifically maintained for the discussion of firewall issues within the Open Source community, and might already reflect new alpha/beta releases under development. Please refer to our product specifications for the functionality of the actual release. Discussions of new/enhanced functionality does not constitute a commitment of Astaro, to integrate this functionality into future releases. issues within the Open Source community, and might already reflect new alpha/beta releases under development. Please refer to our product specifications for the functionality of the actual release. Discussions of new/enhanced functionality does not constitute a commitment of Astaro, to integrate this functionality into future releases.