全球主机交流论坛

标题: 无聊撸了一个nexhost的64M vps [打印本页]

作者: jeaslau    时间: 2015-12-11 00:41
标题: 无聊撸了一个nexhost的64M vps
Nat ip4,给了21个端口,ssh端口是7800,我不知道怎么映射啊,于是发tk问,回答如下:

The Usable Port Range is 1-25 above your SSH Port. this is the same for all Allocated Ports as it always starts with 0 at the end. this is how we map the ports. as it's all done automatically now.

好像是说7801到7825的端口我可以用,但是怎么映射的啊,后台又没有,如果要装nginx或者装ss,我改怎么弄?
作者: jeaslau    时间: 2015-12-11 00:43
1.35刀只能拿来练习命令吗?
作者: 空气    时间: 2015-12-11 00:49
不能自定义映射关系,比如21个端口7801-7821就对应你小鸡的7801-7802端口。
作者: 倾城翻翻    时间: 2015-12-11 00:49
应该是一样装吧  写规则
作者: jeaslau    时间: 2015-12-11 01:08
空气 发表于 2015-12-11 00:49
不能自定义映射关系,比如21个端口7801-7821就对应你小鸡的7801-7802端口。

我在vps上查看ssh端口,是22啊,那么怎么映射成7800的?

他回复我这段话又是什么意思呢?
作者: 月痕    时间: 2015-12-11 01:55
ssh  ip:7800 不就可以连了吗  nginx可以随便监控端口的吧 ss也能修改啊 为什么要映射
作者: 大腿    时间: 2015-12-11 08:39
自己看规则
作者: jeaslau    时间: 2015-12-11 08:41
月痕 发表于 2015-12-11 01:55
ssh  ip:7800 不就可以连了吗  nginx可以随便监控端口的吧 ss也能修改啊 为什么要映射 ...

我知道了,谢谢
作者: 啤酒瓶    时间: 2015-12-11 08:45
iptables -t nat -F
iptables -t nat -A PREROUTING -p tcp --dport 7801 -i venet0 -j DNAT --to-destination 192.168.1.xxx:80
iptables -t nat -A PREROUTING -p tcp --dport 7802 -i venet0 -j DNAT --to-destination 192.168.1.xxx:1080
作者: jeaslau    时间: 2015-12-11 08:47
啤酒瓶 发表于 2015-12-11 08:45
iptables -t nat -F
iptables -t nat -A PREROUTING -p tcp --dport 7801 -i venet0 -j DNAT --to-destinat ...

他们这种共享的端口已经映射好的,我只需要把端口改成他们分配的端口就行了




欢迎光临 全球主机交流论坛 (https://hostloc-workers.ikyomon.com/) Powered by Discuz! X3.4