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

packet filter problems

hi!

i have some problems with the packetfilter.
in my internal network the users should have msn, e-mail and some other services.

the masquerading rule looks fine! 
the services too i think.

e-mail with standard ports works, but only with any-any-allow rule, not with an explicit direction.

msn and bittorrent doesn't work.
services:
Name                  Protocol    Source Port    Destination Port

MSN-Default        TCP                 1:65535          1863
MSN-Filetransfer TCP                 1:65535           6891:6900
MSN-Voice           TCP/UDP         1:65535           6901
Bittorrent            TCP/UDP          6881:6889      6881:6889
SMTP-gmail          TCP                 1:65535          587
POP-gmail            TCP                 1:65535          995

in the firewall rules i have for all these services any-any-allow, but only the gmail rules work.         

where are my mistakes?
and why email only works with any/any?

thanks for your help!


This thread was automatically locked due to age.
  • What masquerading rules do you have in place?

    As an example, to get Bit Torrent to work, you must have a rule in place that maps TCP port 6881 on the WAN interface to the machine on the LAN that is running your Bit Torrent client. If you use a premium Bit Torrent client such as Azureus, port 6881 is the only one you need to map and filter for. You don't need port 6882 - 6889 for anything.

    As for any other services that you wish to present to the outside world,  SNAT masquerading rules will have to be created for them as well.  Setting up packet filter permissions is not enough, you also have to map the relevant port traffic in through the network address translator via masquerading rules.
  • my only  NAT rule is:

    name: masq_int-ext
    type:  masquerading
    network: internal(network)
    Interface: external

    what do you think how the other rules must be?
    and why they must be? i dont understand that..

    thanks for your help! [:)]
  • Masquerading the Internal network behind the WAN interface, which you have already done, is the first, and most obvious rule that you have to create, since that is the rule that lets the machines on the Internal network see out to the Internet.

    A Bit Torrent client is a combined client/server. The outside world will need to see in through your ASL firewall on TCP port 6881 to communicate with it. You must therefore create a SNAT masquerading rule to allow for this.

    You do it this way:

    1. Define your LAN workstation that is running the Bit Torrent client under networks in ASL. Use a netmask of 255.255.255.255 for the machine definition.

    2. Define a service in ASL called BT-6881.
    Type = TCP
    Source port = 1024:65535
    Destination port = 6881

    3. Define a SNAT masquerade rule. 
    Source address = Any
    Destination address = External_Interface
    Service = BT-6881
    Change source to = No change
    Change destination to = 
    Service destination = No change

    For packet filter rules, you need
    From Internal_Network Any service to Any Allow
    from Any BT-6881 service to Internal_Network Allow

    Once  that is in place, your Bit Torrent client should work.

    Stay away from older style Bit Torrent clients that require multiple ports to be opened. The Azureus client that I recommended is available from SourceForge (Google on Azureuz). However, it is written in Java, so you must have the latest (Edition 5) version of the Sun Java run time environment installed on your PC. You will also find that when running Bit Torrents, having 256 MB RAM in a Windows machine is not nearly enough, you really need 512 MB.

    Another issue is that Bit Torrent traffic is capable of saturating your broadband connection. I recieved a letter of reprimand from my ISP the other day, because my traffic exceeded 100 GB this past month. My service plan limit is just 20 GB/month. The Azureus client allows you to define the maximum KB/sec in each direction that you wish to allow through the link.
  • hi!

    it works! thank you very much!
    and the snat/dnat rules must only be touched when i want to use client/server applications?
    not for messaging and so on?

    is it possible to run bittorrent when i enable the http proxy?
    want the proxy for caching only.

    again: thank youvery much!! i was nearly frustrated!
  • azureus works fine without the proxy.
    but the swing-webinterface makes still trouble!
    i did the same things that you told me for azureus...
    create a service with: SP 1024:65535 ->  DP 6660
    create a nat rule
    create a packetfilter rule any-service-any

    the incoming traffic on this port works, but swing uses every time an other port for the outgoing connection. and these packets where dropped.

    so, what can i do to enable the gui?
  • [ QUOTE ]

    and the snat/dnat rules must only be touched when i want to use client/server applications? not for messaging and so on?

    [/ QUOTE ]Correct, you only create the SNAT rules for services that you present to the outside. As an example, if you were running a FTP server in your DMZ, you would need to create a custom SNAT masquerading rule for the outside world to see it. It would be the same with any other type of server, such as a game server, web server, etc.

    [ QUOTE ]
    is it possible to run bittorrent when i enable the http proxy?

    [/ QUOTE ]Certainly. Web browsing and Bit Torrent traffic have nothing to do with each other, beyond the fact that they are both IP sub protocols.

    [ QUOTE ]
    but the swing-webinterface makes still trouble!

    [/ QUOTE ] I know nothing about the software that you call  swing, so I can't help you there.
  • swing is a web interface for azureus. with that plugin azureus can be remote controlled.

    it works fine now (swing)!
    for swing i had to make 2 SNAT/DNAT rules.
    first the rule to  change the destination adress, and in the second rule these adress must be changed to the external interface adress. that was all.

    thanks for your help! i've learned much about NAT and packetfilters from you! 
    (in the practice its a bit different than on the papers[;)])
  • So that's what swing is. Well, I haven't loaded that Azureus web server plugin, since I run Azureus on a Windows XP workstation that I make a remote desktop connection to when I want to control it from somewhere else.

    As a general rule, it is poor practice, from a security perspective, to make filter and SNAT rules that open up your firewall like a swiss cheese. The fewer ports you have open, the less security problems you are likely to have. I therefore prefer to make a VPN connection in to my home LAN when I am elswhere, and then accessing the services I need from inside the VPN.

    Having said that, I have still ended up with a number of open ports in through my ASL box. This is the short list of ports that I have had to open:

    20 & 21 TCP - for FTP server access
    80  TCP - for public access to my web server
    88 TCP - for remote webmail access (NetMail)
    4569 UDP - for IAX VOIP trunking (Asterix PBX)
    6881 TCP - for Bit Torrents (Azureus)

    I keep everything else closed.
  • with the ports you are right!
    but azureus, ftp, email and web services will be placed in the DMZ soon, so that only some ports to my internal network must be opened.(MSN-Messenger, ports that my son needs for playing games)

    i think that it will be secure enough.(its only a private network for testing and learning)
    VPN-Access will be the next to learn in practice for me.
    but i think its not the best way to configure a VPN connection everywhere i am. but its the securest way, thats right.
  • Perhaps I'm being overly cautious, but do we really need to allow internal_network access to ANY port outbound?  I suppose I could allow access to ANY outbound port for at least one computer but I still hate to allow all outbound ports if not necessary.