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

Port Forwarding on ASG 7.505 doesn't work

Hi all,

I try to set up a port forwarding but it doesn't work.
What do I need? I need three ports incoming from the WAN forwarded to a specific internal IP
What have I done:
under definitons I defined a network called media, type host, internal IP 192.168.100.199, type internal
under services I defined three services (service_4713, service_4712, service_4713) type tcp,destination port 4711/4712 and 4713, with source port 1:65535
under network security i defined three packet filter with source external (WAN) (Network), plus service service_4711, destination media (with the internal IP) and action "allowed".

All traffic gets dropped.

Any idea, help is appreciated.

Kind regards shortie


This thread was automatically locked due to age.
  • It looks as if you have only set up your packet filter rules (which seem correct to me), but no NATs.

    Go to Network Security/NAT/DNAT-SNAT and add the corresponsing translations.
    (source: any (or internet), service: your service, destination: WAN address, translation: internal server, service: none (only used if port numbers should be translated too).

    together with your packet filter this should work.

    also another hint: creating a service group of those 3 services let's you use only one packet filter and one nat for the same purpose instead of 3 entries each.

    Edit: Your pf-rules actually won't work: you need to use "any" or "internet" as source.
  • Hi, Shortie,

    I read Krycek's suggestions, and his hint gave me an idea.  I'm lazy, so I always try to think of how to do things with the least work...

    Assuming that all three ports need to be open to the same internal IP, you could define a server "Mediaserver" = "192.168.100.199" and a service "Media" = "1:65535 -> 4711:4713" and create a NAT rule with 'Automatic packet filter rule' checked:

    Traffic Source: Internet
    Traffic Service: Media
    Traffic Destination: External (Address)
     
    NAT mode: DNAT (Destination)

    Destination: Mediaserver
    Destination Service: {This must be left empty!}


    Cheers - Bob
  • Hi there,

    thanks so far.
    I decided to start all over.

    1. New network definition
        - name mediaserver
        - type: host
        - adress: 192.168.100.199
        - interface: internal
        - comment: none

    2. new service definitions    (three, one here as an example)
        - names: media_1, media_2, media_3
        - typ: TCP
        - destination ports: 4711, 4712, 4713
        - source port: 1:65535

    3. new packet filter
        - new group media
        - position: bottom
        - source: any
        - service: media_1, media_2, media_3
        - action: allow
        - time event: allways
        - log traffice: checked

    4. new DNAT rules
        - name: media_1, media_2, media_3
        - new group:media
        - traffic source: any
        - traffic service: media_1, media_2, mdeia_3
        - traffic destination: WAN (adress)
        - NAT Mode: DNAT
        - destination: Mediaserver (which is the IP-adress)
        - destination service: none / left empty



    It still doesn't work....   Hmmm.... strange settings anyway for the purpose. Because anybody with an ID should be able to connect from the outside to my internal server......
    Also, where or how can I build a service group..


    Kind regards shortie
  • 1. In general, you will never want to bind a network/host definition to an interface.  I can't tell you the technical reasons for that, but I know it's a fact that doing so can cause random, unexpected problems.

    I wonder if you were composing your last post and didn't see the suggestion I posted above?

    Cheers - Bob
  • Bob, it is indeed the laziest version to do this but I must say I rather not use those auto-pf-rules as they won't allow me to see anything in the log. I rather have the option of seeing what's happening.
    Other than that it's probably the easiest way to do so.

    @shortie: your packet filter entry is missing the destination. did you put the internal server address there (don't use the wan address here!)?

    also: creating service groups is done by adding a new service and choosing type "group".
  • I rather not use those auto-pf-rules as they won't allow me to see anything in the log. I rather have the option of seeing what's happening.

    Agreed, and when I can't debug something by using just the 'Log initial packets' option, I do exactly what you do.  To make the PF log easier to read, I keep a disabled rule at the top of the PF rule list so I can change it and test something without changing all of the other rule numbers.

    Like I said, I'm lazy and I don't want to have to think when I can avoid it! [;)]

    Cheers - Bob
  • Hi BLAFson,

    you are correct. I wrote while you were posting ;-) Your are from OK City? Tinker is a well known place for me!

    I disable the things in from my previous post and did what you suggested.

    So now a have a service called media with ports 4711:4713 = 1:65535 and a DNAT-rule with traffic-source: internet, traffic-service media, traffic-dest. external (WAN) (address), NAT Mode: DNAT, Destination: my mediaserver (host), destination service: empty, automatic packet filter rule

    Hope so far this correct, but I don't understand your comment number one.
    Is it wrong to create a service "type" host, with the in my case internal ip bound to the internal interface. How should I do it then?


    Thanks for your help and patience.

    shortie
  • Hi again,

    @Krycek: Yes I put the internal server adress there, as defined under networks (as a host with internal IP 192.168.100.199)
    As far as understood BALFson, this is wrong.....
    Still doensn't work...

    I tried BALFsons way but also negative. I guess I'm doing something wrong :-(

    shortie
  • In the network/host definition, set 'Interface' to > instead of choosing an interface.  You should do this with all of your definitions.

    Cheers - Bob
  • I suspect the problem lies elsewhere.

    Could you activate the logging for your packetfilter rule and "log initial packets" and see what's happening?

    also some screenshots of your DNATs and PF Rules would be helpful.