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

Help configuring Public IP Subnet

Greatings from italy [:)]
I'm a pretty new UTM fan playing at home to understand it better.

I need to know if there are any best practice to publish an entire public subnet using the security layer of utm has to offer.

My ISP use a public ip to route an entire subnet so my setup is something like that (based on esxi):

Public IP (routed subnet) --- v-eth1 --- UTM --- v-eth2 (public subnet) --- different IP for different VMs

Everything works quite fine but I think I took the "complicated road" plus i'm facing some problems like ip reporting error (es. from a vm connected on the subnet the ip reported from myip.com is the public one used for routing the subnet)

Any advice and best practice for accomplish that?
Thanks and have a good day


This thread was automatically locked due to age.
  • Hi, fede-r,

    If you were to google on site:astaro.org transfer network, you would find that an easy solution is to do exactly that.  As WebAdmin creates routes automatically between networks defined on the UTM's interfaces, you only need to make firewall rules to allow traffic to your public DMZ from the Internet or your other internal networks.

    ip reported from myip.com is the public one used for routing the subnet

    Just a guess: you need masquerading rules for your private subnets, but you should not have one for your public DMZ network.

    Cheers - Bob
  • Thanks ablfson i'll give a try today. So isn't required to use the "Additional Addresses" to semplify?
    How can i masquerade if i haven't enought interface (the subnet one)?

    My configuration on the UTM now is:

    WAN1 46.x.x.155 (phisical eth0) used for WebAdmin
    WAN2 46.x.x.152 (v-eth3) used for subnet routing by ISP
    INTERNAL 78.x.x.198/27 (v-eth2) one of the subnet address used as gateway (dunno if i'm wrong)

    Then i created a DHCP service on INTERNAL with the range /27 and used the 78.x.x.198 as DNS/gateway
  • That looks like all public IPs, so you shouldn't need any NAT, masquerading or static routing.  WebAdmin automatically creates routes between the subnets known to it, so you only need to create firewall rules allowing the desired traffic to pass.  the UTM is a "stateful" firewall, so you only need to allow "request" packets, not the responses as they will be accepted by the connection tracker.

    Cheers - Bob
  • Hi BAlfson and thanks again [;)]
    I've just edited my config hardening it and moved my vm to a DMZ (natted). This config gave me a better understan of the whole networking stuff and allow me to edit service better.

    Summary
    1. Created a private network 10.x.x.x, every vm has a private ip
    2. Since my ISP route the entire subnet (78.x.x.198/27) to 46.x.x.152 and use it as gateway, i've set up a WAN2 with 46.x.x.152
    3. Added from "Additional Address" every single ip of the subnet 78.x.x.198/27 on interface WAN2 (46.x.x.152)
    4. Masquerade every vm (private ip) with the corresponding subnet ip
    5. Create DNAT/SNAT with corresponding values

    Everything goes like a charme BUT.. the public ip reported from the VM isn't even the WAN2 (46.x.x.152) but the WAN1 (46.x.x.155) used for Webadmin and other things

    How can i fix this? Just going crazy [:D]
  • Hi,  double check your snats, and post a screen shot. 

    Barry
  • The situation is more complex now with all the NATting going on.  The UTM can do firewalling, Anti-DoS and Intrusion Prevention without a private subnet (10.x.x.x).  There's really not any security advantage to this more-complicated solution, and I would urge you to simply use the public IPs on the DMZ as you had planned originally.

    The only reason to have a private subnet would be if you have a subscription for Webserver Protection - and that might be something you want to consider.

    If you want to keep the structure with a private subnet, then you probably want to use a DNAT with a corresponding SNAT instead of a masquerading rule.  In fact, with the proper addressing in the private subnet, you can replace all of your DNATs with a single 1-to-1 Destination NAT rule and all of your SNATs with a single 1-to-1 Source NAT rule.

    In any case, I would think you would want to used fixed IPs in your DMZ instead of DHCP.

    Also, looking more closely at the two 46.x.x.15x IPs, I suspect that you want to have them both defined on the same Interface instead of having a separate interface for WebAdmin and shell access.  When using VLANs, I like to have one interface that isn't a VLAN so that the admin can reach WebAdmin even if the VLAN switch is dead.  I can't see any advantage to having a separate IP for WebAdmin in your situation.

    Cheers - Bob
  • @BarryG, doublechecked [[:)]]
    Masquerading: 
    DNAT: Any -> Service -> WAN2/Subnet Public IP (78.x.x.198/27) // Translation: VM Private IP
    SNAT: VM Private IP -> Any -> Any // Translation: WAN2/Subnet Public IP (78.x.x.198/27)

    @BAlfson, so you think is better to follow my first "road" and edit the config without NATting.
    First i'll try to play with 1-1 and see if there are any changes then revert to previous cfg [[:)]]
    The following schetch will be good?

    1. Create new interface WAN2 (46.x.x.152) used for routing the subnet and as gateway for the subnet too
    2. New Additional Addresses for every single ip of the subnet 78.x.x.198/27 on interface WAN2 (46.x.x.152)
    3. Edit the VM ip with the static one and create a masquerading rule: VM-IP (78.x.x.197 -> WAN2/78.x.x.197

    Sorry but i think i'm missing something..