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

Creating NAT

Hello guys I'm trying to create a NAT here but for some reason it's not working... let see I'll first let me tell you that this is a VOIP Application, and it connects to a server outside our Organization, in the following way:

Destination IP (VOIP Server): 72.*.*.*
Protocols i'm going to use: TPC/UDP
and the ports that say 1:65535, are supposed to be dynamically assigned ports, but to make sure it'll work i put them like that.
being this said ports to be used:


  • First Port: Destination IP - Protocol: UDP - Destination Port: 5060 - Source IP: Internal network - Source port 5060 - Service name:Voice Signaling
  • Second Port: Destination IP - Protocol: UDP - Destination Port: 6000:10000 - Source IP: Internal network - Souce Port: 1:65535 - Service name: Voice Traffic
  • Third Port: Destination IP - Protocol: TCP - Destination Port: 80,443 - Source IP: Internal network - Souce Port: 1:65535 - Service name: Web
  • Fourth Port: Destination IP - Protocol: TCP - Destination Port: 1024:65535 - Source IP: Internal network - Souce Port: 1:65535 - Service name: RMI, Web


I have created them like the services as displayed:


but when I try to create the NAT I have no clue if I should use DNAT or FULL NAT or SNAT, y tried DNAT like this:



no clue why is not working, but i'll really appriciate any comments, thanks


This thread was automatically locked due to age.
  • The DNAT is wrong for several reasons, but your description of the service indicates that you won't need it anyway.  You didn't say, but I assume that "Five9 Network" is a group of public IPs used by the Five9 servers.

    It looks like all you need is a Masquerading rule 'Internal (Network) -> External' and to allow outbound traffic with a packet filter rule.  I suggest you put all of the outbound services into a service group named "Five9 Services" and create a single PF rule 'Internal (Network) -> Five9 Services -> Five9 Network : Allow'.

    If I've misunderstood and you need to allow some inbound traffic then you will need a DNAT, but remember that the Astaro is a stateful firewall - it tracks the connections and requests it makes, and allows responses to pass without additional PF rules.  This is different, for example, from the rudimentary firewall in most home routers where you must open ports in both directions manually.

    Cheers - Bob
  • I created the PF that way, I'll try to test it before I go back home, one quick thing, is that for the DNAT the config I posted previously will be ok? or you think there's something to be changed, thanks!! [:)]
  • The DNAT is non-functional at best and may prevent traffic from passing, so it definitely should be deleted.  I didn't understand what you were hoping to do with it.

    Cheers - Bob
  • I was trying to PortForward the incoming connections on those ports, but I was kind of confused on how to do it, I read a few things, but still i need some other pointers [:)] I'm going to test on monday morning to see if it works, because TGIF ^_^
  • The people at Five9 should be able to tell you what ports you need to forward.  I'll guess from the above that it's only "Five9 - Voice Signaling":

    Traffic Source: Five9 Network
    Traffic Service: Five9 - Voice Signaling
    Traffic Destination: External (Address)
     
    NAT mode: DNAT (Destination)

    Destination: {host definition of local VoIP server}
    Destination Service: {This must be left empty!}


    Is that what you're trying to do?

    Cheers - Bob
  • actually on my original post are the ports I need to have open for this VOIP to work:

    Destination IP (VOIP Server): 72.*.*.*
    Protocols i'm going to use: TPC/UDP
    and the ports that say 1:65535, are supposed to be dynamically assigned ports, but to make sure it'll work i put them like that.
    being this said ports to be used:


    • First Port: Destination IP - Protocol: UDP - Destination Port: 5060 - Source IP: Internal network - Source port 5060 - Service name:Voice Signaling
    • Second Port: Destination IP - Protocol: UDP - Destination Port: 6000:10000 - Source IP: Internal network - Souce Port: 1:65535 - Service name: Voice Traffic
    • Third Port: Destination IP - Protocol: TCP - Destination Port: 80,443 - Source IP: Internal network - Souce Port: 1:65535 - Service name: Web
    • Fourth Port: Destination IP - Protocol: TCP - Destination Port: 1024:65535 - Source IP: Internal network - Souce Port: 1:65535 - Service name: RMI, Web



    I don't have the a VOIP server, my users connect directly to their server, so instead of the Destination: {host definition of local VoIP server} what should I put in? (i put it in my ASG address)

  • If you don't have an internal server for this service, or public IPs for the individual phones, the service must see these phones as logged-in to it, just like a browser into a remote webserver, so, it appears that no port-forwarding is needed.  Thus, the prescription in Post #2 above should be sufficient.  Be sure to get rid of these DNATs - they definitely will cause things to not work.

    If any inbound ports are necessary, you will see blocked packets in the packet filter log.

    Cheers - Bob
  • Hello guys, I tried to work again on this, I removed the DNAT/SNAt and create the packet filter, but it keeps blocking my connection to the webserver based phone; it says that there's no connection, I can do a ping to the server and works. any other Ideas? by the way how can I make sure the ports I have on the post before can be opened?

    thanks. [:)]

    by the way, while defining the ports can it be done this way: 
    Destination port: 1024:65535
    source port: 20:21
    ??
  • port opened/listening use:
    run > cmd> netstat/a on your local voice box

    Traffic Source: Use "ANY" instead of your specific IPs Five nine (probably wrong block anyway, use different entire blocks so use any) Most VOIP have several blocks they use so its best to use ANY...they still must go to specific port anyway.


    try to remove auto packet rule other than that it looks good.

    mike
  • The post #2 from Balfson will work and that's all you need.

    "It looks like all you need is a Masquerading rule 'Internal (Network) -> External' and to allow outbound traffic with a packet filter rule. I suggest you put all of the outbound services into a service group named "Five9 Services" and create a single PF rule 'Internal (Network) -> Five9 Services -> Five9 Network : Allow'."

    I'm using Ooma VoIP and the method described above by Balfson works for me.  Most VoIP require only outbound traffic.  You might want to find out from your VoIP provider what ports are required and create services for those required ports.

    Good Luck