我的实例声称在设置中没有外部IP地址。
当我运行以下代码时,我会得到一个IP地址。
response = requests.get('http://jsonip.com')
ip = response.json()['ip']
print('Your public IP is:', ip)
>>> Your public IP is: x.x.x.x <-- Masking the IP address for security reasons
返回的地址是什么?这只是一个非静态的IP地址吗?
我希望将子域映射到机器上的本地IP,以便为我的每台虚拟机实现一个IP。
我知道我可以在我自己的机器上设置一个DNS,但这只能解决我自己的机器上的domain。
subdomain.domain.com -> Public IP -> Internal IP 1
subdomain2.domain.com -> Public IP -> Internal IP 2
subdomain2.domain.com -> Public IP -> Internal IP 3
有什么东西可以达到同样的目标吗?
注意:我不只是想要端口80,我想要一个类似于NAT或Reve
我有:[ Host A ] -- [ gateway ] -- [ Host B ],而A和B在不同的子网中。
网关配置:
ip -6 link set enp0s3 up
ip -6 link set enp0s9 up
ip -6 addr flush dev enp0s3
ip -6 addr flush dev enp0s9
ip -6 route flush dev enp0s3
ip -6 route flush dev enp0s9
ip -6 addr add ::ffff:5:7:1:1/126 dev enp0s3
ip -6 addr add ::ffff:5:7:2:1
Apache虚拟主机文档说:
You can alternatively specify an explicit IP address in place of the * in <VirtualHost *:80> directives. For example, you might want to do this in order to run some name-based virtual hosts on one IP address, and either IP-based, or another set of name-based virtual hosts on ano