Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPS浮动IP导致 退出脚本 #6

Open
heluoe opened this issue Mar 20, 2020 · 4 comments
Open

VPS浮动IP导致 退出脚本 #6

heluoe opened this issue Mar 20, 2020 · 4 comments

Comments

@heluoe
Copy link

heluoe commented Mar 20, 2020

ubuntu_install_v2ray2.sh
代码中如果是浮动IP
会导致推出

if [ -z "${res}" ]; then
echo -n "${domain} 解析结果:"
host ${domain}
echo "主机未解析到当前服务器IP(${IP})!"
exit 1
fi

@hijkpw
Copy link
Owner

hijkpw commented Mar 21, 2020

域名解析用的cname?

@heluoe
Copy link
Author

heluoe commented Mar 21, 2020

哦哦,就是 如果用的VPS主机供应商,提供的浮动IP
域名绑定的是浮动IP
不一定和实例上的IP 一样
res=host ${domain}
res=echo -n ${res} | grep ${IP}

res 就会为空

@hijkpw
Copy link
Owner

hijkpw commented Mar 21, 2020

@heluoe 不是,我的意思是既然你的是浮动ip,你的域名是怎么做解析的?用的vps商给的rddns域名?

@heluoe
Copy link
Author

heluoe commented Mar 21, 2020

vps商 想 digital ocean 和 搬瓦工 给的浮动ip 也是外网的固定ip 不过应该是大池里的,每次手动生成一个,就可以在控制台,绑定到转发到实例上了,但是这时候 实例主机 ifconfig 是不知道这个ip的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants