xinetd 是一个功能强大的替代 inetd 的守护进程管理器,用于管理网络服务。它可以控制多个网络服务的启动和关闭,还可以配置服务的参数和限制对服务的访问。
安装
apt install xinetd
删除自带配置
rm -rf /etc/xinetd.d/*
新建ipv4转发
vim /etc/xinetd.d/tcp4-portmap
service tcp4-portmap
{
id = 1
disable = no
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
redirect = ipv6地址 443
port = 443
user = nobody
flags = NODELAY KEEPALIVE NOLIBWRAP IPv4
log_type = FILE /data/xinetd/tcp4-portmap.log
cps = 100 30
}
新建ipv6转发
vim /etc/xinetd.d/tcp6-portmap
service tcp6-portmap
{
id = 2
disable = no
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
redirect = ipv4地址 443
port = 443
user = nobody
flags = NODELAY KEEPALIVE NOLIBWRAP IPv6
log_type = FILE /data/xinetd/tcp6-portmap.log
cps = 100 30
}
启动转发
systemctl start xinetd.service
systemctl restart xinetd.service
systemctl status xinetd.service
评论