我在亚马逊云购买了一台服务器,并配置了两个弹性网络接口和对应的4个ip地址!配置如下
然后我配置了路由策略,不知道对不对。
network:
ethernets:
eth0:
addresses:
- 172.31.18.102/20
- 172.31.19.19/20
dhcp4: no
nameservers:
addresses:
- 8.8.8.8
routes:
- to: 0.0.0.0/0
via: 172.31.16.1
table: 100
- to: 172.31.18.102
via: 0.0.0.0
scope: link
table: 100
- to: 172.31.19.19
scope: link
table: 100
routing-policy:
- from: 172.31.18.102
table: 100
priority: 300
routing-policy:
- from: 172.31.19.19
table: 100
priority: 300
eth1:
addresses:
- 172.31.30.237/20
- 172.31.17.231/20
dhcp4: no
routes:
- to: 0.0.0.0/0
via: 172.31.16.1
table: 101
- to: 172.31.30.237
via: 0.0.0.0
scope: link
table: 101
- to: 172.31.17.231
scope: link
table: 101
routing-policy:
- from: 172.31.30.237
table: 101
routing-policy:
- from: 172.31.17.231
table: 101
version: 2
我所有的公网ip都可以ping通,但是我的需求是ssh 52.52.106.253这个ip进入的,curl请求网站就从52.52.106.253这个ip出去,现在的出口ip都是50.18.215.189。
可以帮助实现我的需求吗?