# Custom route/Port forwarding

**URL:** <https://www.wago.community/t/custom-route-port-forwarding/951>\
**Category:** Hardware and Linux\
**Tags:** pfc200, how-to\
**Created:** [May 14, 2024, 7:33am UTC](https://www.wago.community/t/custom-route-port-forwarding/951 "2024-05-14T07:33:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pehaa](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pehaa](https://www.wago.community/u/pehaa)\
**Post date:** [May 14, 2024, 7:33am UTC](https://www.wago.community/t/custom-route-port-forwarding/951/1 "2024-05-14T07:33:52Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/e1af2416ed0060be5fe59fcf9751ccca911f4c38.png)

Hi,  
I have a setup like described in the picture, my engineering PC is connected to X2 connector of my Wago PLC. Then there’s on IOT module, running an UI application on top of Node Red (port 1880), connected to X2. I would like to route the etherhet traffic through the PLC, so that I can see the UI with my engineering PC. Is that possible? I have tried many to accomplish it by tweaking the ‘Custom Route’ and ‘Port Forwarding’ setting in WBM, but no success so far.

Regards  
Pekka

---

<div class="post-metadata">

**Author:** ![WagoKurt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagokurt/32/11_2.png) [@WagoKurt](https://www.wago.community/u/WagoKurt)\
**Post date:** [May 14, 2024, 2:39pm UTC](https://www.wago.community/t/custom-route-port-forwarding/951/2 "2024-05-14T14:39:07Z")

</div>

try using network=host for the docker container.

---

<div class="post-metadata">

**Author:** ![pehaa](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pehaa](https://www.wago.community/u/pehaa)\
**Post date:** [May 15, 2024, 4:43am UTC](https://www.wago.community/t/custom-route-port-forwarding/951/3 "2024-05-15T04:43:58Z")

</div>

I’m not running Docker.

---

<div class="post-metadata">

**Author:** ![JohnDitter](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/johnditter/32/68_2.png) [@JohnDitter](https://www.wago.community/u/JohnDitter)\
**Post date:** [May 17, 2024, 10:46pm UTC](https://www.wago.community/t/custom-route-port-forwarding/951/4 "2024-05-17T22:46:19Z")

</div>

I’m assuming you’re using two Windows-based computers. If not, some of this post does not apply.

1)Enable “IP-Forwarding through multiple interfaces” in the PFC200 WBM.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/67f911cc65894b9fb3e3ccaeaff9055bee1e4f58.png)

2a) Run “cmd” as the administrator on the IoT Computer  
2b) Execute the command “Route ADD 192.168.1.0 Mask 255.255.255.0 192.168.2.17”.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/2ca00b34503428c225fcc1f44a1b881e59c2b54b.png)

3a) Run “cmd” as the administrator on the Engineering PC  
3b) Execute the command “Route ADD 192.168.2.0 Mask 255.255.255.0 192.168.1.17”.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/3711f0955d71eb53e65e1f03541bf398286898c7.png)

The Engineering PC should be able to communicate with the IoT Computer now.

---

<div class="post-metadata">

**Author:** ![pehaa](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pehaa](https://www.wago.community/u/pehaa)\
**Post date:** [May 21, 2024, 5:28am UTC](https://www.wago.community/t/custom-route-port-forwarding/951/5 "2024-05-21T05:28:06Z")

</div>

Yes, that does it! Thanks a million!  
My IoT device is actually a Raspberry Pi like Linux device, so the first command needed to be “ip route add 192.168.1.0 via 192.168.2.17”

---

<div class="post-metadata">

**Author:** ![VegardS](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@VegardS](https://www.wago.community/u/VegardS)\
**Post date:** [May 21, 2024, 7:40am UTC](https://www.wago.community/t/custom-route-port-forwarding/951/6 "2024-05-21T07:40:27Z")

</div>

I believe that if the IoT module has default gateway set to 192.168.2.17 you dont need to manually add the route on that device, only the engineering PC.

You could also possibly activate IP masquerading on the PLC.

---

<div class="post-metadata">

**Author:** ![Kipirex](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@Kipirex](https://www.wago.community/u/Kipirex)\
**Post date:** [August 27, 2024, 8:59pm UTC](https://www.wago.community/t/custom-route-port-forwarding/951/7 "2024-08-27T20:59:11Z")

</div>

Is there a way I can communicate with the couplers using different LAN segments? I tried to add a Route like this but I can only see the X2 Port of my PFC200

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/fe3f400e06171e6b45841d65f8f57dc3a737a961.jpeg)

I tried to use a Custom Route with the WBM but doesn´t seem to ping with the couplers. I have the Routing Option Enabled also

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/230f597c58d613098f3c9248fad6833063382e40.png)

How can I do this with Custom Routes? Is there a difference with the IP Masquerading?

---

<div class="post-metadata">

**Author:** ![JohnDitter](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/johnditter/32/68_2.png) [@JohnDitter](https://www.wago.community/u/JohnDitter)\
**Post date:** [August 30, 2024, 8:19pm UTC](https://www.wago.community/t/custom-route-port-forwarding/951/9 "2024-08-30T20:19:58Z")

</div>

The easiest way to make this work…

1. Delete your custom route
2. Enable “IP Forwarding through multiple interfaces” in the WBM of the 750-8212?
3. Set the Default Gateway in both 750-362s? In your case, it should be 192.168.1.13?
4. Execute the following Route command on the laptop from the CLI with administrative privileges: “ROUTE ADD 192.168.1.0 MASK 255.255.255.0 192.168.100.12”

You should now be able to PING the 750-362s from your laptop.
