本文介绍: 本文主要介绍linux 环境下 端口转发安装及维护。
修订记录
零 摘要
本文主要介绍linux 环境下 端口转发安装及维护
一 环境
[root@2023001 ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[root@2023001 ~]#
[root@2023001 ~]# rinetd -v
rinetd 0.62
[root@2023001 ~]#
二 安装及维护
2.1 rinted
2.1.1 安装及配置
2.1.1.1 下载
下载地址:http://li.nux.ro/download/nux/misc/el7/x86_64//rinetd-0.62-9.el7.nux.x86_64.rpm
[root@2023001 soft]# wget http://li.nux.ro/download/nux/misc/el7/x86_64//rinetd-0.62-9.el7.nux.x86_64.rpm
2.1.1.2 安装
直接rpm -ivh 即可
[root@2023001 soft]# rpm -ivh rinetd-0.62-9.el7.nux.x86_64.rpm
warning: rinetd-0.62-9.el7.nux.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 85c6cd8a: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:rinetd-0.62-9.el7.nux ################################# [100%]
2.1.1.3 配置
配置文件地址/etc/rinetd.conf
假设通过当前服务器874 端口 ,转发到 mirrors.tuna.tsinghua.edu.cn 服务器873 端口
0.0.0.0 874 mirrors.tuna.tsinghua.edu.cn 873
2.1.2 维护
2.1.2.1 常用命令
启动
[root@2023001 etc]# systemctl restart rinetd
[root@2023001 etc]# systemctl status rinetd
● rinetd.service - SYSV: rinetd is a TCP redirection server
Loaded: loaded (/etc/rc.d/init.d/rinetd; bad; vendor preset: disabled)
Active: active (running) since Sun 2024-02-04 16:45:00 CST; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 30257 ExecStart=/etc/rc.d/init.d/rinetd start (code=exited, status=0/SUCCESS)
Tasks: 1
Memory: 1.0M
CGroup: /system.slice/rinetd.service
└─30266 /usr/sbin/rinetd
配置开机启动
[root@2023001 ~]# systemctl enable rinetd
rinetd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig rinetd on
[root@2023001 ~]# systemctl list-unit-files | grep enable | grep rine
[root@2023001 ~]#
检查开机启动
[root@2023001 ~]# chkconfig --list | grep rinetd
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
rinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@2023001 ~]#
原文地址:https://blog.csdn.net/nasooo/article/details/136029255
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_65949.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。