Enable port
![]() | Automatic port enabling for TwinCAT Functions Ports that are required for TwinCAT Functions are automatically enabled once the TwinCAT Functions have been installed. |
To enable a port in the firewall, a rule must be added that allows incoming connections on this port. As an example, an incoming connection for TCP port 48898 is created in a separate configuration file, which is required for TwinCAT ADS.
Proceed as follows:
- 1. Use the command
ip addr showto determine the available Ethernet interfaces. - Examples of available Ethernet interfaces: lo, end1, end0
- 2. Select an Ethernet interface to be configured for TwinCAT ADS.
- 3. Create a configuration file in the /etc/nftables.conf.d/ directory with the name
60-ads.conf, for example
sudo nano /etc/nftables.conf.d/60-ads.conf- 4. Insert the following content and adjust the values to your network requirements:
table inet filter {
chain input {
# accept ADS
iifname "end1" tcp dport 48898 accept
}
}- 5. Save and close the configuration file.
- 6. Load the new rule with the command
sudo systemctl reload nftables- 7. Check the settings and make sure that the configuration has been applied correctly.
sudo nft list ruleset