Centos安装KED GUI+XRDP远程桌面

 

yum install epel-release
yum -y groupinstall "KDE"
yum -y install langpacks-zh_CN.noarch
yum -y install xrdp
startx
systemctl start xrdp
systemctl enable xrdp
firewall-cmd --permanent --zone=public --add-port=3389/tcp  --permanent
firewall-cmd --reload

/etc/xrdp/xrdp.ini 里面的port=3389可以修改成想要的端口.

然后可以通过GUI干一些其他的事情了.

RouterOS配置MGMT管理VRF

/ip address add address={管理IP地址}/24 interface=ether1 
/ip route add distance=1 gateway={网关IP地址} routing-mark=MGMT
/ip route rule add src-address={管理IP地址}/32 table=MGMT
/ip route vrf add interfaces=ether1 routing-mark=MGMT

caddy1服务启动报错问题

纯粹口水一下caddy1遇上的启动报错问题.

报错内容如下

   Process: 472999 ExecStart=/usr/bin/caddy -conf /etc/caddy/caddy.conf -root /tmp -agree (code=exited, status=1/FAILURE)
   Main PID: 472999 (code=exited, status=1/FAILURE)
        CPU: 26ms

Aug 12 11:48:36 klayer systemd[1]: Starting Caddy HTTP/2 web server...
Aug 12 11:48:36 klayer caddy[472992]: Caddyfile is valid
Aug 12 11:48:36 klayer systemd[1]: Started Caddy HTTP/2 web server.
Aug 12 11:48:36 klayer caddy[472999]: Activating privacy features... 2023/08/12 11:48:36 failed storage check: open /var/lib/caddy/rw_test_1203782840230465039>
Aug 12 11:48:36 klayer systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Aug 12 11:48:36 klayer systemd[1]: caddy.service: Failed with result 'exit-code'.

 

解决如下

ulimit -n 8192
cat>>/etc/security/limits.conf<<EOF

* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535

root soft nofile 65535
root hard nofile 65535
root soft nproc 65535
root hard nproc 65535

EOF

useradd  -M  caddy -s /sbin/nologin
mkdir /var/lib/caddy
chown caddy.caddy  /var/lib/caddy

 

一个是limits系统参数问题,一个/var/lib/caddy目录问题, 如果caddy用户给root权限就没第二个问题.

huawei路由上使用stelnet 登录ssh

半夜调路由, 手抖输错个字符还给commit了, BGP给整掉线了, 还好PTP的IP还在线, 顺手记录下

stelnet 目标IP 端口号, 然后回车输入用户密码登录完成.

ssh client first-time enable 
stelnet host-ipv4 [ port ] [  [ prefer_kex { dh_group1 | dh_exchange_group } ] | [ prefer_ctos_cipher { des | 3des | aes128 } ] | [ prefer_stoc_cipher { des | 3des | aes128 } ] | [ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] | [ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 } ] ] *  [ -ki aliveinterval [ -kc alivecountmax ] ]