Webserver behind NAT

Hi all,

I’m using a RUT200 in a BMS system. I have a Weidmuller field bus coupler which has a webserver configuration page. As the coupler is in my local network, I use NAT for reaching it:

iptables -t nat -I PREROUTING -d 172.16.5.220 -j DNAT --to-destination 192.168.1.15
iptables -t nat -I POSTROUTING -s 192.168.1.15 -j SNAT --to-source 172.16.5.220

I’m able to ping the device but I’m not able to acces the configurations page. Could someone help please? Thank you

Hello,

Does your LAN device has a default gateway configured?

Have you tried enabling masquerading on the LAN => WAN zone in Network → Firewall?

Could you please draw a simple topology with IP addresses marked?

Kind Regards,

Hi,

Thank you for helping.

LAN device gateway is configured to 192.168.1.77.
LAN => WAN masquerade is enabled. I attached a screenshot. Maybe something is wrong here ?
I attach topology screenshot also. When I’m trying to connect to device 172.16.5.221 (192.168.1.15) the page is just loading but nothing happens.

Regards,
Tibor G.

webserver


Hello,

Are you trying to communicate between different LANs (VLANS)?

It seems that currently you allow LAN to ZoneTest (but not WAN?), and from WAN to LAN, but not from ZoneTest to LAN. Is this intended? Could you please add other zones for testing?

If you connect your PC directly to 192.168.1.0/24 network, are you able to reach your server without NAT?

Kind Regards,

Hello,

Indeed, my zones were not coherent. I have created new zones LAN2 => WAN and WAN => LAN2.
I have also opened port 55421 on 172.16.5.222 to acces port 80 on 192.168.1.15 but no solution yet.
Could a backup help in order to check if something else is wrong ?

Regards, Tibor G.


This topic was automatically closed after 15 days. New replies are no longer allowed.