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

UTMv9 question about port forwarding

Hi!

I'm new with using Sophos UTM v9. I have a problem with port forwarding and i hope someone here can help me.

I'm using UTM with an extra IP (1.2.3.4), that needs to port forward to our web server (5.6.7.8). But i want to keep the IP of the user that request the website. So the situation:

client (9.10.11.12) -> gateway (1.2.3.4) -> web server (5.6.7.8)

I've got that working. But in my website I'm using $_SERVER['REMOTE_ADDR']. Normally that returns the IP of the client (9.10.11.12), but now its the gateway's address(1.2.3.4).

I understand that's because I've used SNAT and DNAT rules. But i can't get it to work without.

Can someone help me with this? I've been using Google the whole morning and can't find a solution.

Kind regards,

Nick


This thread was automatically locked due to age.
Parents
  • Hi, Nick, and I second Olsi's welcome to the User BB!

    http://testen.test0.nl/ip.php

    Those of us here who do security seriously are hesitant to click on links we don't know.  I happened to have a sandbox open, so I tried this there with a result of 10.0.0.10 - I assume that that's the IP of "Internal (Address)" instead of 10.0.0.1 as in your diagram.

    That shouldn't happen unless you have a NAT rule on the Internal interface.  Please check 'Masquerading' to confirm that you don't have a masq rule for it, and check the 'NAT' tab to be sure you don't have a Full NAT or SNAT involved.  Did you find it?

    The generic proxy only works for clients.  This DNAT-only approach should work for you.

    If the primary reason for the UTM is to protect the web servers, you might indeed want the additional protection offered by Webserver Protection.  You will need to disable the DNATs if you try webserver protection.  Your reseller can get a 30-day demo license for you to see if this is something that would work for you.

    Cheers - Bob
Reply
  • Hi, Nick, and I second Olsi's welcome to the User BB!

    http://testen.test0.nl/ip.php

    Those of us here who do security seriously are hesitant to click on links we don't know.  I happened to have a sandbox open, so I tried this there with a result of 10.0.0.10 - I assume that that's the IP of "Internal (Address)" instead of 10.0.0.1 as in your diagram.

    That shouldn't happen unless you have a NAT rule on the Internal interface.  Please check 'Masquerading' to confirm that you don't have a masq rule for it, and check the 'NAT' tab to be sure you don't have a Full NAT or SNAT involved.  Did you find it?

    The generic proxy only works for clients.  This DNAT-only approach should work for you.

    If the primary reason for the UTM is to protect the web servers, you might indeed want the additional protection offered by Webserver Protection.  You will need to disable the DNATs if you try webserver protection.  Your reseller can get a 30-day demo license for you to see if this is something that would work for you.

    Cheers - Bob
Children
  • Hi BarryG and BAlfson,

    Good morning from the Netherlands. 

    I've made some screenshots from the NAT and MASQ page. I have a MASQ rule because without it won't work. 

    @BAlfson, i understand you don't normally click on a unknown URL. But thank you for looking [;)] 10.0.0.10 is the internal interface as you said. Because its a testing envirmont it hasn't got the real IP yet.

    Is there another way to do this?



    Thank you all for the support so far!