Using the Serial Console ....................... 2-3 Using the SSH Console ......................... 2-5 Sudo Mechanism ..........................2-7 Booting Up the UC-8540 for the First Time ..................... 2-8 User Account Management ........................2-8 Switching to the Root Account ...................... 2-8 Creating and Deleting User Accounts ..................... 2-9 Disabling the Default User Account .......................
Page 4
A-12 Using rsync for External Backups ....................A-12 Automating rsync Backups ......................A-12 NFS (Network File System) ........................ A-13 Setting Up the UC-8540 Computer as an NFS Client ..............A-13 SNMP .............................. A-13 OpenVPN ............................A-15 Static-Key VPN .......................... A-15 Package Management........................
Page 5
Removing Installed Packages ...................... A-19 Firmware Upgrade ..........................B-1 Overview ............................B-2 A. Connecting to the UC-8540 Computer ..................B-2 B. Download and Launch the TFTP Program ..................B-2 C. Downloading and Upgrading the Firmware Through the Serial Port ..........B-3...
Thank you for purchasing Moxa’s UC-8540 Series Arm-based computer. This is the software operation and programming manual for the Linux model of the UC-8540 computer and covers the use of Linux functions with examples on how to program the UC-8540. In addition, detailed description of the various basic and advanced functions of the Mobile Intelligent Routing Framework (MIRF) 2.0 tool are provided for use in rail applications.
Getting Started In this chapter, we describe how to configure the basic settings in your UC-8540 computer. The following topics are covered in this chapter: Software Architecture Software Packages Connecting to the UC-8540 Computer Using the Serial Console ...
Connecting to the UC-8540 Computer You will need access to a notebook computer or a PC to connect to the UC-8540 computer and log on to the command line interface. There are two ways to connect to the UC-8540 computer: through a serial console cable or through an Ethernet cable.
The procedure to use the terminal software to connect to the UC-8540 computer in a Linux environment and in a Windows environment is described in the following two sections: Linux Users WARNING DO NOT apply these steps to the UC-8540 computer. These steps apply only to the Linux PC that you use to connect to the UC-8540 computer.
Page 10
| Exit from Minicom | +---------------------------------------+ NOTE You need to know which device node is connected to the UC-8540 computer to configure this setting. 5. Select E to configure the port settings according to the Serial Console Port Settings table provided above.
Windows Users WARNING DO NOT apply these steps to the UC-8540 computer. These steps are for the Windows PC that you use to connect to the UC-8540 computer. Take the following steps to connect to the UC-8540 computer from your Windows PC: 1.
Page 12
Linux Users NOTE Do NOT apply these steps to the UC-8540 Computer. The instructions in this section are for the Linux PC that you use to connect to the UC-8540 computer. Use the ssh command to access the UC-8540 computer’s LAN1 port from a Linux computer.
Take the following steps from your Windows PC. Click on the link, http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to download PuTTY (free software) to set up an SSH console for the UC-8540 computer in a Windows environment. The following figure shows an example of the configuration that is required: username password...
Booting Up the UC-8540 for the First Time We suggest using the serial console when you log in for the first time. Once you have connected the UC-8540 computer to a PC, power on the UC-8540. The computer will start the boot-up process immediately. The power LED will light up first, followed by the ready LED.
Modifying Network Settings via the Serial Console In this section, we use the serial console to configure the UC-8540 computer’s network settings. Follow the instructions given in the Connecting to the UC-8540 Computer section to access the console utility of the target Moxa:~# cd /etc/network...
Page 16
Setting a Static IP Address iface command to modify the address, To set a static IP address for the UC-8540 computer, use the network, netmask, and broadcast parameters of the Ethernet interface. # interfaces(5) file used by ifup(8) and ifdown(8)
-a UC-8540-LX version 1.1 Build 18090615 Adjusting the Time The UC-8540 computer has two time settings. One is the system time, and the other is the RTC (Real-Time #date Clock) time maintained by the UC-8540 Series hardware. Use the...
Page 18
(glibc) if no value has been set for the TZ environment variable. This file is either a copy of the /usr/share/zoneinfo/ file or a symbolic link to it. You should find a suitable timezone information file and write over the original local time file in the UC-8540 computer. 2-12...
/etc/init.d/snmpd stop systemctl /etc/init.d/ In comparison to , scripts in will only start or stop the services in the current boot session. Once you reboot the UC-8540 computer, it will go back to the default settings managed by systemctl 2-13...
Rebooting/Shutting Down the Computer IMPORTANT Do NOT use the reset switch on the front panel of the UC-8540 computer to shut down a running Debian GNU/Linux system. Do NOT turn off the UC-8540 when Debian GNU/Linux OS is running on the computer.
The firmware of the UC-8540 computer can be updated through an external USB disk. Prepare a USB disk with the firmware image and plug it into USB port of the UC-8540 computer. Power on the computer and take the following steps: Windows Users: 1.
Page 22
UC-8540 Series Software UM Getting Started Linux Users: 1. After powering on the UC-8540 computer, press DEL to enter the Bootloader configuration settings. ---------------------------------------------------------------------------- Model: UC-8540 Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004 LAN1 MAC: 00:90:e8:00:ee:0d LAN2 MAC: 00:90:e8:00:ee:0e ----------------------------------------------------------------------------...
Page 23
UC-8540 Series Software UM Getting Started ---------------------------------------------------------------------------- (0) Fastboot mode (1) Firmware Update by USB Disk (2) Firmware Update by Tftp --------------------------------------------------------------------------- Command>>1 Firmware File Name (firmware.img): FWR_UC-8540-LX_V1.0_Build_17021003_bata.img ---------------------------------------------------------------------------- Model: UC-8540 Boot Loader Version 1.0.0S02 Serial Number: BOSTON000004 LAN1 MAC: 00:90:e8:00:ee:0d...
Page 24
(1) Firmware Update by USB Disk (2) Firmware Update by Tftp --------------------------------------------------------------------------- Command>> 4. After rebooting the machine, you can use the following command to check if the firmware is up-to-date. moxa@Moxa:~$ kversion -a UC-8540-LX version 1.0 Build 17021003 2-18...
Advanced Configuration of Peripherals In this chapter, we include more information on the UC-8540 computer’s peripherals, such as the serial interface, storage, and cellular module. The following topics are covered in this chapter: Serial Ports stty USB Port ...
UC-8540 Series Software UM Advanced Configuration of Peripherals Serial Ports The serial ports support RS-232, RS-422, and RS-485 2-wire operation modes with flexible baudrate settings. setinterface The default operation mode is set to RS-232. Use the command to change the operation...
USB Port The UC-8540 computer has a USB port that you can use to expand the storage capacity of the computer. USB Automount The UC-8540 computer supports the hot plug function for connecting USB mass storage devices. However, by mount default, the automount utility (udev) only supports automounting of one partition.
Reset-to-default will erase all the data stored on the boot storage Please back up your files before resetting the system to factory defaults. All the data stored in the UC-8540 computer‘s boot storage will be erased after resetting to factory defaults. Do not turn off the power supply when the Reset-to-default process is in progress.
UC-8540 Series Software UM Advanced Configuration of Peripherals Command Description Password stop Stop network restart Restart network power_on Power ON. power_off Power OFF power_cycle Power cycle the module slot switch_sim <1|2> Switch SIM slot gps_on GPS ON gps_off GPS OFF attach_status Query network registration status.
Be sure to disconnect the connection if you no longer need the service using the following command: moxa@Moxa:~$ sudo cell_mgmt stop Powering On/Off the Cellular Module The cell_mgmt tool can be used to re-initialize the module without rebooting the UC-8540. Issue the following command to power off the module: moxa@Moxa:~# sudo cell_mgmt power_off...
Page 31
UC-8540 Series Software UM Advanced Configuration of Peripherals Command Description start Type=[type] SSID=[ssid] Insert an AP information to the managed AP list and then connect to the Password=[password] [type] open/wep/wpa/wpa2 [ssid] access point's SSID [password] access point's password start [network id...
Programmer’s Guide In this chapter, we briefly introduce the tool-chain and teach you how to program the UC-8540 computer. The programming example package can be downloaded from Moxa’s website. The following topics are covered in this chapter: Introduction to the Linux Tool Chain ...
Cross Compilation To ensure that an application will be able to run correctly when installed on the UC-8540 computer, you must ensure that it is compiled and linked to the same libraries that will be present on the UC-8540 computer.
Page 34
UC-8540 Series Software UM Programmer’s Guide After you unzip the package, run the install script and follow the instructions. user@Linux:~$ sudo ./arm-linux-gnueabihf_4.9_Build_amd64_16053113.sh Welcome to MOXA ARM Linux platform toolchain installer. This toolchain built with arm-linux-gnueabihf compiler v4.7.3 and glibc v2.15.
In this section, we use the standard “Hello World” example to illustrate how to develop a program for the UC-8540 computer. #include <stdio.h> int main() printf("Hello World\n"); return 0; The following compiler tools are provided in the UC-8540. Manage archives (static libraries) Assembler c++, g++ C++ compiler C preprocessor...
If bugs are found, return to Step 4. If no bugs are found, continue with Step 7 7. Back up the user directory (distribute the program to additional UC-8540 computer units if needed). hello.c The CD provided with the UC-8540 Series contains several example programs. Here we use as an example to show you how to compile and run your applications.
Contact Moxa technical support staff if you need help to use the example code. Makefile Example The following Makefile is copied from the “Hello World” example in the package provided with the UC-8540 computer. For cross compilation, use the following:...
Page 38
UC-8540 Series Software UM Programmer’s Guide Function RTC_RD_TIME Description Reads time information from the RTC; returns the value of argument 3. Usage struct rtc_time rtc_tm; ioctl(fd, RTC_RD_TIME, &rtc_tm); Function RTC_SET_TIME Description Sets the RTC time. Argument 3 will be passed to the RTC.
UC-8540 Series Software UM Programmer’s Guide WDT (Watch Dog Timer) You can either enable or disable the WDT based on your application. When the WDT is enabled, but the application does not acknowledge it, the system will reboot. You can set the...
UC-8540 Series Software UM Programmer’s Guide LED Indicators You can configure and view the status of the UC-8540’s LEDs using Moxa’s LED control utility. An example code is provided to enable you to use the utility in your applications. mx_led_control The command enables you to control UC-8540’s 6 Signal LEDs and 1 Programmable (PGM)
# mx_led_control -s 2 -r 0100 NOTE The signal LEDs are controlled by UC-8540’s firmware and are used to indicate the wireless signal strength. If you need to customize the signal LEDs for other purposes, please contact a Moxa sales representative for customization services.
Page 42
UC-8540 Series Software UM Programmer’s Guide For example, to set 10 seconds delay time for power on # mx_igt -s on -t 10 You will see the delay time of power on is set to 10 seconds: # mx_igt -l...
Mobile Intelligent Routing Framework (MIRF) 2.0 In this chapter, we briefly introduce the MIRF 2.0 tool and show you how to use it on the UC-8540 computer. Moxa's Mobile Intelligent Routing Framework (MIRF) is an open-platform, multiple-WAN management tool that helps provide unbeatable wireless service for train passengers as the train travels through different regions.
Page 44
UC-8540 Series Software UM MIRF 2.0 Configuring System Settings Configuring Serial Settings Configuring the System Time Configuring Admin Settings Configuring GPS Settings Configuring Remote Control Settings System Maintenance Configuring Signal Tracker Settings ...
UC-8540 Series Software UM MIRF 2.0 Basic Configuration 1. Connect your PC/Notebook and UC-8540’s LAN2 to the same network. 2. Open a browser and connect to https://192.168.4.127. 3. Click Get Started to continue and type the default username and password: Username: admin@moxa.com...
Editing User Profiles After you have successfully connected to the UC-8540, you can start configuring the MIRF 2.0 functions. You might want to update your user profile first. Click on the ADMIN box on the upper-right corner of the main page and select Profile.
UC-8540 Series Software UM MIRF 2.0 Type the account profile and information in the fields. When finished, click SAVE to complete. To add new users, click the add icon on the top right corner of the screen. Using the Control Panel MIRF 2.0 provides a control panel that you can use to view, enable, or disable specific system settings.
Page 48
UC-8540 Series Software UM MIRF 2.0 You can view the current status of the settings or enable/disable the settings directly from the Control Panel page. WARNING Turning off the Web Access from WAN setting will disconnect MIRF 2.0 from the Server.
UC-8540 Series Software UM MIRF 2.0 Device Information This function allows users to update system hostname and device name, and view the system status, such as software version, system uptime, and system memory size. Editing the Hostname On the Device Information page, click the edit icon to edit the hostname.
UC-8540 Series Software UM MIRF 2.0 Provide the device name in the field. When finished, click SAVE. Checking the Software Version You can check the software version from the control panel. Checking the System Uptime You can check the system uptime from the control panel.
UC-8540 Series Software UM MIRF 2.0 Maintenance This function allows users to update various system settings. Upgrading the Firmware In Maintenance, click the icon to upgrade the system with the firmware provided by Moxa. Select the firmware file in .frm format from your computer, or drop the file into the upgrade page. Wait for a few minutes for the system to upgrade.
UC-8540 Series Software UM MIRF 2.0 Exporting the System Configuration File In Maintenance, click the icon to export the system configuration file. A system configuration file in tar.gz format will be downloaded to your computer. Importing a System Configuration File In Maintenance, click the icon to import the system configuration file.
UC-8540 Series Software UM MIRF 2.0 The following screen will appear; wait for the system to reboot. Exporting the System Log Files In Maintenance, click the icon to export the system. A system log file in tar.gz format will be downloaded to your system.
UC-8540 Series Software UM MIRF 2.0 Configuring a Gateway Click Gateway to configure settings such as Network, Firewall, and System. Configuring Network Settings This function includes various settings, including LAN, Wi-Fi, Cellular, DCHP Server, DNS, OpenVPN Client, and SSH. Configuring Ethernet Settings Click LAN to view the current LAN settings on the main page.
Configure all settings. When finished, click SAVE. Configuring Wi-Fi Settings UC-8540 is able to support both Wi-Fi AP and Client modes. To configure a Wi-Fi Client mode, do the following: 1. Select Wifi Client operation mode and click Add a Wi-Fi Network...
Page 56
UC-8540 Series Software UM MIRF 2.0 2. Click SCAN 3. Select a Wi-Fi AP from the AP List 4. Configure Security mode and Password and then Click Save 5-14...
Page 57
UC-8540 Series Software UM MIRF 2.0 5. Check Enable if you want this function to be activated and then Click Save 5-15...
Page 58
UC-8540 Series Software UM MIRF 2.0 6. Click WAN and select WLAN0 tab to configure the IP settings. You may choose to set your IP using DHCP or Static. If you select Static, enter all the necessary information in the text fields. When finished, click SAVE.
Page 59
UC-8540 Series Software UM MIRF 2.0 7. Click Network Overview and click WLAN0 tab to check wireless client status. 5-17...
Page 60
UC-8540 Series Software UM MIRF 2.0 To configure Wi-Fi AP mode, do the following: 1. Select Access Point operation mode and configure SSID and Password. The default Security mode is WPA/WPA2 Personal 2. If you need to configure advanced options of Wi-Fi Access point, Click Show ADVANCE.
UC-8540 Series Software UM MIRF 2.0 Configuring Cellular Settings Click Cellular Status to view the current cellular settings, including basic information, IP information and data usage. To configure the cellular settings, Click Cellular Settings 1. Configure Cellular Module settings. Click Edit...
Page 62
UC-8540 Series Software UM MIRF 2.0 select Enable Cellular Module to enable the WWAN0 Click Default Cellular profile to configure cellular settings NOTE UC8540 supports dual sim slots for one cellular module allows you to use the same or different cellular providers for redundancy.
Page 63
UC-8540 Series Software UM MIRF 2.0 By Default, you just need to choose Static APN, Configure APN, select SIM slot and configure Pin code. When finished, click SAVE. If every configuration is fine, Cellular module should connect to internet without problem. Click Cellular Status to check Cellular connection status.
Page 64
MIRF 2.0 2. Configure Keep-Alive Sometimes cellular connection may be terminated abnormally. Enable Keep-Alive function to set the UC-8540 to check the cellular the connection by performing remote host Ping. If the connection check fails after 3 retries, the UC-8540 starts the connection recovery process.
UC-8540 Series Software UM MIRF 2.0 Configuring Routing Client Settings Click Routing to view the current Routing settings. Select specific interface and click arrow to set routing priority, click SAVE 5-23...
UC-8540 Series Software UM MIRF 2.0 Configuring OpenVPN Client Settings Click OpenVPN Client to view the current OpenVPN settings. 5-24...
Page 67
UC-8540 Series Software UM MIRF 2.0 To configure the settings, click the edit icon. Select Settings. You can download an OpenVPN setting sample file by clicking on the download icon. Select Enable, and then select the file from your computer, and then upload to the MIRF 2.0. When the file upload is complete (as indicated by the status bar), click SAVE.
UC-8540 Series Software UM MIRF 2.0 Configuring SSH Settings Click SSH to view the current SSH settings. To configure the settings, click the edit icon. Select Settings to continue. Select Enable and provide password. When finished, click SAVE. 5-26...
UC-8540 Series Software UM MIRF 2.0 Configuring QoS Settings Click QoS to view the current QoS settings. To add a new rule for QoS List, click the icon. Select Enable, and then provide the necessary information. When finished, click SAVE.
UC-8540 Series Software UM MIRF 2.0 Configuring Load Balance Settings Click Load Balance to view the current Load Balance settings. Select specific interface and click arrow to set load balance priority. Scroll the Toggle bar to set the weight of...
UC-8540 Series Software UM MIRF 2.0 To configure the settings, click the edit icon. Select Settings to continue. Select Enable SNMP Agent. Edit Trusted Host IP and Agent Port, click SAVE. Configuring VRRP Settings The Virtual Router Redundancy Protocol (VRRP) enables a group of routers to form a single virtual router with a virtual IP address.
Page 73
UC-8540 Series Software UM MIRF 2.0 To configure the settings, click the ADD icon. Check Enable Entry to create VRRP entry and configure Virtual IP & Priority. Determines priority in a VRRP group. The priority value range is 1 to 245, with 245 the highest priority and default priority is 100.
Page 74
UC-8540 Series Software UM MIRF 2.0 Set authority for current entry and input password if necessary Set Advertisement Interval for from 1 to 255 seconds, with default 1 second. Check to enable Preemption Mode Select Enable after adding all VRRP entries.
UC-8540 Series Software UM MIRF 2.0 Configuring Firewall Settings To configure firewall settings, select Firewall from the main menu. Select Port Forward to view the current firewall settings. To add a new rule for port forward, click the icon. Select Enable, and then provide the necessary information. When finished, click SAVE.
Page 76
UC-8540 Series Software UM MIRF 2.0 Select Firewall to view the current firewall settings. To add a new rule for Firewall, click the icon. Select Enable, and then provide the necessary information. When finished, click SAVE. 5-34...
Page 77
UC-8540 Series Software UM MIRF 2.0 Select WiFi Mac Filter to view the current MAC Filter settings. To add a new rule for MAC Filter, click the edit icon. Edit MAC Address and related description, click SAVE. 5-35...
UC-8540 Series Software UM MIRF 2.0 Configuring System Settings Select System from the menu. System settings include various options, such as Serial, Time, Admin, GPS, CS Remote Control, Maintenance and Signal Tracker. 5-36...
UC-8540 Series Software UM MIRF 2.0 Configuring Serial Settings Select Serial to view the current serial settings. To configure the serial settings, click the edit icon. Select Settings. Configure the serial port interface by selecting from the drop-down list. When finished, click SAVE.
UC-8540 Series Software UM MIRF 2.0 Configuring the System Time Select Time to view the current system time. To configure the system time, click the edit icon. 5-38...
UC-8540 Series Software UM MIRF 2.0 Select Settings. Select if you want to use Synchronization Mode, and offer the Time Server name and Time Interval value. When finished, click SAVE. Configuring Admin Settings Select Admin to view the current HTTP/HTTPS services settings and corresponding port number.
UC-8540 Series Software UM MIRF 2.0 Select Settings. Use the Toggle bars to enable/disable HTTPS and HTTP services for the current ThingsPro Gateway. You can assign a port to each of these two services. When finished, click SAVE. Configuring GPS Settings Select GPS to view the current GPS settings.
Page 83
UC-8540 Series Software UM MIRF 2.0 Select Settings. Select Enable to automatically receive GPS data. Specify the allocated interface for the major GPS module and set the data refresh interval. Click SAVE. If you don’t enable the GPS function, you can manually enter the Latitude and Longitude values in the fields.
UC-8540 Series Software UM MIRF 2.0 Configuring Remote Control Settings Select CS Remote Control to view the current settings. This allows you to remotely connect to ThingsPro Server. You can get this information during the Enablement Utility registration process. To configure, click the edit icon.
UC-8540 Series Software UM MIRF 2.0 Select Enable, and provide the values for Host, Port, and PSK. You can click TEST CONNECTION, or SAVE to finish. System Maintenance This section is the same as the procedure in Maintenance in the main menu section. Refer to Maintenance section.
UC-8540 Series Software UM MIRF 2.0 Configuring Signal Tracker Settings Select Signal Tracker to view the current GPS location from map. To configure, click the edit icon. Check Enable to active Signal Tracker function. Set Interval in minutes from 1 to 60 minutes, with default 1 minute.
UC-8540 Series Software UM MIRF 2.0 Managing User Accounts This section describes how to add new account, and manage the existing account. Select User Account from the menu. Creating a New Account To create a new account, select the icon.
UC-8540 Series Software UM MIRF 2.0 Editing the Administrator Information To edit the administrator information, click Edit. Edit the information in the specific fields. When finished, click SAVE. 5-46...
UC-8540 Series Software UM MIRF 2.0 Updating User Account Information To update an existing user, check the user, and then select the edit icon. For access rights of the root, admin, and user, refer to the following table. Configuration API Token...
UC-8540 Series Software UM MIRF 2.0 Edit the information in the specific fields. When finished, click SAVE. Deleting a User Account To delete an account, select the account, and then click the delete icon. Managing User Programs MIRF 2.0 allows developers to develop their own programs or applications and upload them to MIRF 2.0 . Select the User Programs tab from the main menu.
Page 91
Scenario: Synchronize system time with network time server every minute. Follow the steps below to create the script file and upload it to MIRF 2.0: 1. Connect to the UC-8540 computer through the console port or via an Ethernet cable. Log in to the computer.
Page 92
UC-8540 Series Software UM MIRF 2.0 6. After clicking the SAVE button, the program will be available under the User Programs section of the main menu. 5-50...
Using the General Debian Package In this chapter, we explain how to use the general Debian Package on the UC-8540 computer. The following topics are covered in this appendix: NTP Client Package Management Executing Scheduled Commands with cron ...
UC-8540 Series Software UM Using the General Debian Package NTP Client The UC-8540 computer has a built-in NTP (Network Time Protocol) client that is used to initialize a time request #ntpdate <IP address of the server> to a remote NTP server. Use to update the system time.
UC-8540 Series Software UM Using the General Debian Package NOTE Click the following link for more information on cron. http://www.debian-administration.org/articles/56 Log Processing using rsyslog Rsyslog is an enhanced, multi-threaded log reporting utility with a focus on security and reliability. It offers support for on-demand disk buffering, log reports and alarms delivered over TCP, SSL, TLS, and RELP, writing to databases, and email alerting.
Click the following link for more information on rsyslog. https://wiki.debian.org/Rsyslog http://www.rsyslog.com/doc/ OpenSSL The UC-8540 computer supports hardware accelerator with openssl. Check the version of openssl; it should indicate that it was modified by Moxa. moxa@Moxa:~$ dpkg -l | grep openssl ii openssl 1.0.2j-1~bpo8+1+moxa...
UC-8540 Series Software UM Using the General Debian Package After enabling the hardware accelerator: moxa@Moxa:~$ sudo openssl speed -evp aes-128-cbc [sudo] password for moxa: Doing aes-128-cbc for 3s on 16 size blocks: 100640 aes-128-cbc's in 0.18s Doing aes-128-cbc for 3s on 64 size blocks: 111456 aes-128-cbc's in 0.11s Doing aes-128-cbc for 3s on 256 size blocks: 119786 aes-128-cbc's in 0.16s...
4. At this point, the account and its default path should be configured. NOTE Click the following link for more information on SSH: https://wiki.debian.org/SSH The UC-8540 computer supports DNS client (but not DNS server). To set up DNS client, you need to edit three /etc/hosts /etc/resolv.conf /etc/nsswitch.conf...
A rule (such as a jump to a user-defined chain in the same table) is called a target. iptables : Filter tables, NAT tables, and Mangle tables: The UC-8540 computer supports three types of Filter Table—includes three chains: INPUT chain...
Page 100
SNAT OUTPUT • DNAT POSTROUTING • MASQUERADE The UC-8540 computer supports the following sub-modules. Be sure to use the module that matches your application. The most common modules are already built in to the kernel: ip6t_eui64.ko ip6t_ipv6header.ko nf_conntrack_ipv6.ko xfrm4_mode_tunnel.ko ip6t_rt.ko ip6t_LOG.ko...
#iptables [-t tables] [-P] [INPUT, OUTPUT, FORWARD, PREROUTING, OUTPUT, POSTROUTING] [ACCEPT, DROP] Set the policy for the chain to the given target. INPUT: For packets destined for the UC-8540 computer sockets. OUTPUT: For locally-generated packets. FORWARD: For packets routed out through the UC-8540 computer.
#modprobe modprobe xt_tcpudp #iptables –A INPUT –i eth0 –p tcp --dport 21 –j DROP Example 6: Accept TCP packets from 192.168.0.24 to UC-8540 computer’s ports, 137, 138, and 139 #iptables –A INPUT –i eth0 –p tcp –s 192.168.0.24 --dport 137:139 –j ACCEPT Example 7: Log TCP packets that are received by UC-8540 computer’s port 25.
In this example, the IP address of all packets leaving LAN1 are changed to 192.168.3.127 (you will need to load the module ipt_MASQUERADE): Enabling NAT at Bootup In most real world situations, you will want to use a simple shell script to enable NAT when the UC-8540 boots up. The following script is an example. #!/bin/bash # If you put this shell script in the /home/nat.sh...
UC-8540 Series Software UM Using the General Debian Package rsync rsync is a utility software and network protocol that synchronizes files and directories from one location to another while minimizing data transfer by using delta encoding when appropriate. It also has the option to provide encrypted transfer by use of SSH.
NFS allows users to develop applications for the UC-8540 computer, without worrying about the amount of disk space that will be available. The UC-8540 computer supports NFS protocol for client.
Page 106
UC-8540 Series Software UM Using the General Debian Package The following simple example shows the use of an SNMP browser on the host site to query the UC-8540 computer, which is the SNMP agent. The UC-8540 computer responds with the following: debian:~# snmpwalk -v 2c -c public -Cc 192.168.27.115...
UC-8540 Series Software UM Using the General Debian Package OpenVPN insserv –d openvpn The OpenVPN package is installed but disabled by default. Use the command to enable OpenVPN package at the next bootup. To enable the OpenVPN package with immediate effect, you can use the /etc/init.d/openvpn start...
UC-8540 Series Software UM Using the General Debian Package ATTENTION When using an OpenVPN-related application, you need to create a firewall policy. On the server’s firewall, open UDP 1194 (default port). If you are using shorewall on both devices, add a new VPN zone to represent tun0 and create a default policy for it.
UC-8540 Series Software UM Using the General Debian Package Checking Package Information To get more detailed package information (e.g., version number, check sums, size, installed size, category) show along with the short description, use the sub-command, as shown below: moxa@Moxa:~$ sudo apt-cache show vim...
UC-8540 Series Software UM Using the General Debian Package Upgrading Specific Packages –only-upgrade Use the sub command to NOT install new packages, but only upgrade already installed packages. moxa@Moxa:~$ sudo apt-get install packageName --only-upgrade Installing Specific Package Version To install a specific version of a package, use “...
UC-8540 Series Software UM Using the General Debian Package Download a Package Without Installing the Package download Use the option to download any given package without installing it. For example, the following command will only download the “nethogs” package to the current working directory.
Firmware Upgrade The following topics are covered in this appendix: Overview A. Connecting to the UC-8540 Computer B. Download and Launch the TFTP Program C. Downloading and Upgrading the Firmware Through the Serial Port...
However, we suggest that you go through all three steps to ensure the firmware upgrades properly. A. Connecting to the UC-8540 Computer Refer to Connecting to the UC-8540 Computer section in Chapter 2 Getting Started. B. Download and Launch the TFTP Program 1.
Serial Port 1. Connect to Moxa’s website at http://www.moxa.com, and then select Firmware/Drivers/Documents from the Support & Downloads drop-down menu. 2. Enter the model name”UC-8540 Series” or select the specific product model from the down-down list. Click on Search to continue.
Page 115
UC-8540 Series Software UM Firmware Upgrade 3. Select Firmware from the Software column. Choose the appropriate OS and then click the download icon to start downloading the new firmware. Note: Check the filename, it may differ from the filename shown below.
Page 116
UC-8540 Series Software UM Firmware Upgrade ------------------------------------------------------------------------ (0) Fastboot mode (1) Firmware Update by USB Disk (2) Firmware Update by Tftp ------------------------------------------------------------------------ Command>> 7. In the boot loader utility, select [2] Firmware Update by Tftp, and then [1] Set IP Address if you want to reconfigure IP addresses.
Need help?
Do you have a question about the UC-8540 and is the answer not in the manual?
Questions and answers