# PLC IP address NAT options

**URL:** <https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163>\
**Category:** Ignition\
**Created:** [May 25, 2023, 10:54am UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163 "2023-05-25T10:54:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [May 25, 2023, 10:54am UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/1 "2023-05-25T10:54:37Z")

</div>

Hello,

I was wondering if the configuration of let's say S7 1200 PLC driver would allow direct NAT:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/489ad0f35342831298a6ff90d21d7bda6d839ebc.png)  
In fact I have given few trials, but it did not work.  
Supposed, my PLC has IP address 172.155.0.11 (Hostname), and the network adapter has IP address 192.168.173.20 (Local address).  
Is this the idea? For me it does not work.  
Thank you for your help.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 25, 2023, 11:37am UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/2 "2023-05-25T11:37:50Z")

</div>

Gateway! Gateway! Gateway!

If you're using NAT then you need to make sure that your PLC has its gateway configured to point back to the NAT router. If it doesn't the PLC will see that the source's IP address is on a different subnet (determined by the subnet mask) so it will shrug its shoulders and drop the request since it has no idea how to route the response back to the outside network.

Test steps:

- Check that you can ping the PLC on the LAN.
- If you have access to the router then repeat the ping test from there using the LAN address.
- Check your NAT rules look OK and then ping from the WAN.

If you fail the last step then check the PLC network gateway configuration.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 25, 2023, 12:21pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/3 "2023-05-25T12:21:59Z")

</div>

And whatever else you do, don't expose the WAN side to the internet.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [May 25, 2023, 12:26pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/4 "2023-05-25T12:26:39Z")

</div>

I have done this exercise many times. If I add router with NAT, everything is OK.I just was wondering if there is some workaround using Ignition driver configuration.  
Thank you [Transistor](https://forum.inductiveautomation.com/u/Transistor) and [pturmel](https://forum.inductiveautomation.com/u/pturmel) for your replies.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 25, 2023, 12:32pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/5 "2023-05-25T12:32:57Z")

</div>

> [@d.vasilev](#):
>
> some workaround

I'm not sure I understand what you mean. Are you suggesting Ignition would somehow contact and configure the router for you? Because that is fundamentally where NAT actually happens, and therefore needs to be configured there. Whether Ignition is the client or something else.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [May 25, 2023, 12:58pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/6 "2023-05-25T12:58:25Z")

</div>

Let me clear some points related to the driver configuration page.  
Again as above I will use random IP addresses.  
Ignition is installed on PC, or on WM with IP 170.170.0.170. Gateway 170.170.0.1.  
The PLC has IP address 182.169.0.225. Gateway 182.169.0.1.Networks 170.170.0.0 and 182.169.0.0 are bridged. Subnet masks 255.255.255.0 on both. I can ping the PLC from 170.170.0.170. In this case what shall I insert in "Local address"? Leave it empty by default, right?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 25, 2023, 1:01pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/7 "2023-05-25T13:01:32Z")

</div>

> [@d.vasilev](#):
>
> In this case what shall I insert in "Local address"? Leave it empty by default, right?

Leave it empty.

The Local Address setting is supposed to be used to force the driver to connect from a certain NIC when you have multiple NICs and the routing tables aren't set up right or you just need to connect from a certain NIC for some other reason.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 25, 2023, 1:05pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/8 "2023-05-25T13:05:50Z")

</div>

> [@d.vasilev](#):
>
> I can ping the PLC from 170.170.0.170.

Do you mean you can ping 182.169.0.225? If so, that means you are **NOT** using NAT. Just normal routing.

---

<div class="post-metadata">

**Author:** ![d.vasilev](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@d.vasilev](https://forum.inductiveautomation.com/u/d.vasilev)\
**Post date:** [May 25, 2023, 6:38pm UTC](https://forum.inductiveautomation.com/t/plc-ip-address-nat-options/74163/9 "2023-05-25T18:38:29Z")

</div>

@pturmel, you are correct, terminology wise, once again thank you for your reply.  
@Kevin.Herron , thank you for your explanation, crystal clear.
