Moxa UC-8410A-T-LX [52/86] Append or delete rules

Moxa UC-8410A-T-LX [52/86] Append or delete rules
UC-8410A Series Linux Software General Debian Package Usage
5-12
Append or Delete Rules
Usage:
# iptables [-t table] [-AI] [INPUT, OUTPUT, FORWARD] [-io interface] [-p tcp, udp,
icmp, all] [-s IP/network] [--sport ports] [-d IP/network] [--dport ports] j [ACCEPT.
DROP]
-A: Append one or more rules to the end of the selected chain.
-I: Insert one or more rules in the selected chain as the given rule number.
-i: Name of an interface via which a packet is going to be received.
-o: Name of an interface via which a packet is going to be sent.
-p: The protocol of the rule or of the packet to check.
-s: Source address (network name, host name, network IP address, or plain IP address).
--sport: Source port number.
-d: Destination address.
--dport: Destination port number.
-j: Jump target. Specifies the target of the rules; i.e., how to handle matched packets.
For example, ACCEPT the packet, DROP the packet, or LOG the packet.
Examples:
Example 1: Accept all packets from lo interface.
# iptables –A INPUT –i lo –j ACCEPT
Example 2: Accept TCP packets from 192.168.0.1.
# iptables –A INPUT –i eth0 –p tcp –s 192.168.0.1 –j ACCEPT
Example 3: Accept TCP packets from Class C network 192.168.1.0/24.
#
iptables –A INPUT –i eth0 –p tcp –s 192.168.1.0/24 –j ACCEPT
Example 4: Drop TCP packets from 192.168.1.25.
# iptables –A INPUT –i eth0 –p tcp –s 192.168.1.25 –j DROP
Example 5: Drop TCP packets addressed for port 21.
# 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-8410A series’s port 137, 138, 139
# iptables –A INPUT –i eth0 –p tcp –s 192.168.0.24 --dport 137:139 –j ACCEPT
Example 7: Log TCP packets that visit UC-8410A series’s port 25.
# iptables –A INPUT –i eth0 –p tcp --dport 25 –j LOG
Example 8: Drop all packets from MAC address 01:02:03:04:05:06.
# modprobe xt_mac
# iptables A INPUT i eth0 p all m mac -–mac-source 01:02:03:04:05:06 j DROP
NOTE: In Example 8, remember to issue the command #modprobe ipt_mac first to load module ipt_mac.
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. SSL encrypted transfer can be done via Stunnel wrapping. rsync uses
the ‘rsync algorithm’, which provides a very fast method for bringing remote files into sync. rsync can copy or
display directory contents and copy files, optionally using compression and recursion.

Содержание

Скачать