全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1357|回复: 9
打印 上一主题 下一主题

无聊撸了一个nexhost的64M vps

[复制链接]
跳转到指定楼层
1#
发表于 2015-12-11 00:41:39 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
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,我改怎么弄?
10#
 楼主| 发表于 2015-12-11 08:47:39 | 只看该作者
啤酒瓶 发表于 2015-12-11 08:45
iptables -t nat -F
iptables -t nat -A PREROUTING -p tcp --dport 7801 -i venet0 -j DNAT --to-destinat ...

他们这种共享的端口已经映射好的,我只需要把端口改成他们分配的端口就行了
9#
发表于 2015-12-11 08:45:16 | 只看该作者
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
8#
 楼主| 发表于 2015-12-11 08:41:10 | 只看该作者
月痕 发表于 2015-12-11 01:55
ssh  ip:7800 不就可以连了吗  nginx可以随便监控端口的吧 ss也能修改啊 为什么要映射 ...

我知道了,谢谢
7#
发表于 2015-12-11 08:39:44 | 只看该作者
自己看规则
6#
发表于 2015-12-11 01:55:38 | 只看该作者
ssh  ip:7800 不就可以连了吗  nginx可以随便监控端口的吧 ss也能修改啊 为什么要映射
5#
 楼主| 发表于 2015-12-11 01:08:34 | 只看该作者
空气 发表于 2015-12-11 00:49
不能自定义映射关系,比如21个端口7801-7821就对应你小鸡的7801-7802端口。

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

他回复我这段话又是什么意思呢?
4#
发表于 2015-12-11 00:49:20 | 只看该作者
应该是一样装吧  写规则
3#
发表于 2015-12-11 00:49:03 | 只看该作者
不能自定义映射关系,比如21个端口7801-7821就对应你小鸡的7801-7802端口。
2#
 楼主| 发表于 2015-12-11 00:43:30 | 只看该作者
1.35刀只能拿来练习命令吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-15 06:56 , Processed in 0.065827 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表