1.rsync的默认端口为873
2.修改rsync端口:使用root用户修改文件/etc/xinetd.d/rsync
# default: off
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/local/bin/rsync
server_args = --daemon
log_on_failure += USERID
port = 9999
}
修改/etc/services
rsync 9999/tcp # rsync
rsync 9999/udp # rsync
3.linux下的防火墙
Filter table 这是用iptables命令修改规则时需要的默认表,防火墙的大部分的实现都是在这里实现的。
INPUT 当有访问本地系统的数据包时,此链被处理。
FORWARD 当有通过本地系统的数据时,此链被处理。
OUTPUT 当有本地系统产生的数据包时,此链被处理。
目标是当一个包符合一个给定的规则时应该采取的行动。 目标是用 j <target> 文法进行说明
ACCEPT 包由TCP/IP协议栈的区域部分接受并处理。
DROP 包丢弃且不通知发送端。
RETURN 在前一个链中,紧接着最近被处理的那个规则后的规则处继续处理。
4. 防火墙规则的停止、启用,重载
service iptables stop
service iptables start
service iptables restart