Internet Connection Sharing
The Internet connection of the mobile modem can be shared with other subscribers in the network.
To do this, routing must be activated in the modem settings via optiCONTROL:
In the following example, the optiMEAS device has the IP address 10.20.30.40 on the Ethernet interface
Configuration of the client
The IP address of the client must be in the same network. In this example, 10.20.30.55 was used. The IP address of the optiMEAS device must be entered as the gateway. The IP address of a public DNS server must also be entered. In this example, we use the DNS server from Google. See also: https://developers.google.com/speed/public-dns?hl=en
Port forwarding
It is possible to configure port forwarding via NAT in order to access the client from the Internet via VPN. This option is only available from Yocto version 5.2.
Enter the following commands in an SSH shell to forward two TCP ports of the smartRAIL to the client 10.20.30.55:
# Backup old ruleset
cp -v /sdi/config/nftables.conf /sdi/config/nftables.conf.orig
# delete previous configuration
nft delete table ip nat
# Setup DNAT rulechain
nft add table ip nat
nft -- add chain ip nat prerouting { type nat hook prerouting priority -100 \; }
nft -- add chain ip nat postrouting { type nat hook postrouting priority 100 \; }
nft add rule ip nat prerouting tcp dport 1000 dnat to 10.20.30.55:22
nft add rule ip nat prerouting tcp dport 5901 dnat to 10.20.30.55:5901
nft add rule ip nat postrouting masquerade
# Save ruleset for activation on modem dial-in
nft list ruleset > /sdi/config/nftables.conf
# Restore saved ruleset
nft flush ruleset
nft -f /sdi/config/nftables.conf
Note: If routing is activated, the rules from the config/nftables.conf file are restored when the LTS modem is dialed in.