在VPS( Ubuntu)装了 oneinstack 后,xrdp 连接不上了

问答中心分类: Linux在VPS( Ubuntu)装了 oneinstack 后,xrdp 连接不上了
boypay asked 8年 ago
VPS上 用 netstat -ntl  看到 127.0.0.1:3350 和 0.0.0.0:3389都是打开的,但是客户机上 telnet  vps 3389 却连接失败
我怀疑是 iptables 的问题,不知怎么解决。

3 Answers
oneinstack answered 8年 ago
/etc/iptables.up.rules加上相应端口试试

boypay answered 8年 ago
卸载了原来的 xrdp 和 vncserver
vncserver -kill :1
vncserver -kill :2
sudo apt-get --purge remove vnc4server
sudo xrdp -kill
sudo apt-get --purge remove xrdp
apt-get autoremove
之后加入修改了iptables 和 ufw (VPS中 ufw 是关闭的)
/etc/iptables.up.rules 中加入
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3389 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 3389 -j ACCEPT
ufw 中加入
sudo ufw allow 3350/tcp
sudo ufw allow 3389/tcp
重新安装了 xrdp
sudo apt-get install xrdp
重启VPS后 连接 xrdp 正常
reboot

boypay answered 8年 ago
谢谢指点