Guest User!

You are not Sophos Staff.

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

Service Definitions Destination and Source Ports

Hello, 

I am having a difficult time understand Source and Destination ports for Service  Definitions. The help file says:

Destination Port: Enter the destination port either as single port number (e.g., 80) or as a range (e.g., 1024:64000), using a colon as delimiter.

Source Port: Enter the source port either as single port number (e.g., 80) or as a range (e.g., 1024:64000), using a colon as delimiter.


That's great and all but it doesn't really explain what these fields do. Having a source and destination implies a direction, But I might apply this service to an outgoing rule or an incoming rule. 

Lets say I want to use this on an inbound rule for 35000-35099 (UDP) wouldn't the source and destination ports be the same? Why do I see everyone using the default which is "1:65535" I think i just need some perspective. 

Thank You


This thread was automatically locked due to age.
  • Source is usually set as 1:65535, as you can't control what this will be.  Client systems will generally randomly use an available port above 1023 to initiate connections.  For the most part, it's the destination port that you will be setting in your custom service definitions to something more specific.

    The help file explains setting for the UTM, but it does not go into whys and wherefores/networking 101, otherwise it would be several thousand pages long and completely unreadable.Heck, I've got a multi-volume set of books on just TCP/IP that runs to about 4,000 pages.

    http://en.wikipedia.org/wiki/Port_(computer_networking)
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
  • Hi Scott, 
    First, thanks for replying to me, and taking the time to help me, I really do appreciate it, but I unfortunately still don't understand. 

    I would judge my network skill set as firmly intermediate. Thus I am willing to say that of course there are things I don't fully understand yet. That being said, I still don't understand this, and don't think that what you said above about teaching tcp/ip is truly fair. 

    I cut my teeth on object oriented firewalls with SonicWall. On a SonicWall, when you create a service object, there is no such thing as a source and destination port when creating the service object. You just create the object with a port or range that the service exists on. Then if you want to translate to a different port later, you use NAT to do that. Even looking at the sophos creation for a NAT rule it has the options to define Source and Destination Service.

    It does not seem logical to imply direction on creation of a service object. You also stated:

    Source is usually set as 1:65535, as you can't control what this will be.


    While I agree with you, you can know what this will be ahead of time. For example I know that for this video game I need to port forward these values.

    Would you mind teaching me why the source value is present? I am sure there is a reason but I just don't get it right now. 

    Thanks!
  • Let's try this visually.  Got a windows client system?  Do some web surfing.  From the command line do a NetStat -o.  This will show the source (local computer) IP colon port used (source port), then destination colon port used (destination port, by either number or name if well known).  You will notice that even when the destination is a service using a well known port, like http (80) or https (443), the source is usually something random over 1023.

    In the case of your game, the ports given are all destination, just a matter of what the destination is.  If outbound, the destination is the bungie servers, if inbound, the destination is your console.

    With other systems that you've used, you are just setting the destination port and the source port is automatically being set to 1-65535 or the source port is just being ignored.  UTM just gives you the additional option to change the source port, but in the majority of cases it should be 1:65535.

    Did this help?
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
  • Hey Scott, 

    Why Yes! That did help. I believe I understand. 

    Thanks Man.
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?