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
  • Wellcome 
    a bit confused about "But i want to keep the IP of the user that request the website"
    anyway you can use Webserver Protection for this purpose (and in UTM you will find the logs of day requests) and not nat rules 
    if you have home license
Reply
  • Wellcome 
    a bit confused about "But i want to keep the IP of the user that request the website"
    anyway you can use Webserver Protection for this purpose (and in UTM you will find the logs of day requests) and not nat rules 
    if you have home license
Children
  • Hi oldeda,

    Thank you for your reply! We're bought a licence for network protection, so no webserver protection. But if webserver protection can do what i want we will buy that!

    Underneed you find a simple network overview how we want to build our network. Maybe that clears some confusion.


    Both examples are working. We can view the websites and everything is working fine. But because we want to give some users more rights on specified parts of the website we need there real IP address (autologin on IP base for example). But because we are using NAT we can't do that because the IP the webservers receive is the IP of the firewall (10.0.0.1).

    Will webserver protection be able to do what i want? Or are there other ways to do it? 

    Kind regards,

    Nick

    Edit
    I'm going to test your tips BarryG. I will edit this post with the results!

    Edit2
    BarryG. That saves a lot of NAT records ^^ I've been testing, its working with only DNAT. But i still get the wrong IP. You can see it here: http://testen.test0.nl/ip.php

    You will see 10.0.0.10 (that is the current IP of internal interface of the firewall, its a test configuration). The goal is to see your IP on that page. 

    My DNAT rule: