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, 

    1. your SNATs, as configured, will not do anything useful and may be contributing to your problems. Turn them off for now, or fix them (see below).

    2. you are mixing IPs up in your examples. Earlier you implied that 1.2.3.4 is one of your external interface IPs, and your web server's internal address is 5.6.7.8, but in your last post, 5.6.7.8 seems to be an external IP.
    Therefore, I can't say for sure if your DNATs are correct as I'm confused.

    SNATs (OPTIONAL):
    Source: webserver1
    Dest: Internet
    Change source to: External Address1
    (note there's no point in using SNATs if you're going to use the same External Address for all of the servers; you might as well just use a single MASQ instead)

    Source: webserver2
    Dest: Internet
    Change source to: External Address2
    ...

    Barry
  • Hi BarryG,

    Sorry about the confusion. The drawing i've made tonight is from my official documentation. I've only changed the IP's. My openingspost is writen from my work so i've hadn't the correct drawing with me.

    SNAT is turned off. I've only have a DNAT rule now:


    As you can see here: http://testen.test0.nl/ip.php the IP the webserver receives is the internal interface of the Astaro UTM. 

    I Would like to see that the webserver receives your real home IP address. 

    I've also just tested the "generic" Proxy. But that doesn't do the job.

    Is the only solution to buy 'Webserver Protection' then? Or I'm i missing something with the NAT rules?
Reply
  • Hi BarryG,

    Sorry about the confusion. The drawing i've made tonight is from my official documentation. I've only changed the IP's. My openingspost is writen from my work so i've hadn't the correct drawing with me.

    SNAT is turned off. I've only have a DNAT rule now:


    As you can see here: http://testen.test0.nl/ip.php the IP the webserver receives is the internal interface of the Astaro UTM. 

    I Would like to see that the webserver receives your real home IP address. 

    I've also just tested the "generic" Proxy. But that doesn't do the job.

    Is the only solution to buy 'Webserver Protection' then? Or I'm i missing something with the NAT rules?
Children
No Data