3/12/2021 1:53 PM | |
Joined: 4/17/2018 Last visit: 11/10/2023 Posts: 84 Rating:
|
Hello forum, i would like to show you a small sketch of a network configuration. See attachment. Shown is an automation network with fixed ip 192.168.0.0/24 and an office network with ip 192.168.178.0/24 which is connected to the internet. I would like to address two topics: For the sake of simplicity we may leave alone security (firewall, port forwarding..) topics of the two I use the IOT2050 with the downloadable "free" Debian. So far I succeeded. Now I am stuck between dnsmasq, route add... and ip route add ... What I need is a kick to the right path. T.i.a. AttachmentMappe1.pdf (288 Downloads) |
3/18/2021 12:20 PM | |
Joined: 12/12/2016 Last visit: 12/6/2023 Posts: 640 Rating:
|
Hello Frank, To be honest it seems like an acchievable, but not very suitable task for the IOT2050 (EDIT: in case the network on the left hand side uses Safety). In this case a hardware firewall (e.g scalance) could be more suitable for complete isolation of the PROFINET network. If you want to go this way regardless, I think the easiest option is to work with iptables. It can be integrated into a newer version of the IOT2050 image, which you can build from the master branch. Notice that the iptables compatability was added in October 2020 so the example image from SIOS does currently not support it. Best Regards! |
Last edited by: Fe_lipe at: 03/18/2021 12:20:57Last edited by: Fe_lipe at: 04/07/2021 13:28:45 |
|
4/9/2021 3:52 PM | |
Joined: 12/12/2016 Last visit: 12/6/2023 Posts: 640 Rating:
|
Hello Frank, We now had time for a closer look into your network setup and were able to configure iptables accordingly. Firstly, I recommend installing Webmin which provides a nice UI for handling Network and Firewall configuration. When installing Webmin over APT repository, dont forget to add the correct Architechture to /etc/sources.list
Afterwards the UI is reachable over https://<iot-ip>:10000, use root login of IOT! In the section Networking->Linux Firewall, enter the Dropdown Menu Showing IPtable (NAT): You should see your POSTROUTING rule below which you have already entered (for you the interface should be eth1) -> scroll right to see entire screenshot Now switching back to Dropdown Menu Packet filtering, we should now be looking at the FORWARD rules. Here, based on the drawing of your network we want to do two things:
For this we specify one accept rule for source address 192.168.0.3/32 on incoming interface eth0, one accept rule for source address 192.168.178.40/32 on incoming interface eth1, one drop rule for incoming interface eth0 and one drop rule for incoming interface eth1. In my case the configuration looks like this: Make sure the rules are also in this exact order. Afterwards, scroll down and select Apply Configuration and also select Activate at boot to make rules persistent: The configuration should now be working. In my case I did not specify any input rules. Ofc there is still room for improvement as e.g. adding input rules can save CPU consumption by dropping packets before they are forwarded. To double-check how these rules can also be entered in terminal
Hope this helps! BR |
Last edited by: Fe_lipe at: 04/09/2021 15:54:42Last edited by: Fe_lipe at: 04/09/2021 16:16:00Last edited by: Fe_lipe at: 04/09/2021 16:18:53typo |
|
This contribution was helpful to
2 thankful Users |
Follow us on