vps交流

[美国VPS] 云服务器绑定了2个弹性网卡,每个弹性网卡有公网ip,如.....


如题
代理是用x-ui搭的
[美国VPS]  云服务器绑定了2个弹性网卡,每个弹性网卡有公网ip,如.....
[美国VPS]  云服务器绑定了2个弹性网卡,每个弹性网卡有公网ip,如.....
然后2个代理我访问,出口ip都是主网卡的公网ip152.136.168.204,
按照gpt添加了路由后
#!/bin/sh
ip rule add from 192.168.0.15 table 100
ip route add default via 192.168.0.1 dev eth0 table 100

ip rule add from 192.168.0.8 table 101
ip route add default via 192.168.0.1 dev eth1 table 101

iptables -t mangle -A OUTPUT -p tcp –sport 10938 -j MARK –set-mark 100
ip rule add fwmark 100 table 100

iptables -t mangle -A OUTPUT -p tcp –sport 40671 -j MARK –set-mark 101
ip rule add fwmark 101 table 101

,都变成了辅助网卡的ip

赞(0)
版权声明:本贴采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
帖子名称:《[美国VPS] 云服务器绑定了2个弹性网卡,每个弹性网卡有公网ip,如.....》
帖子链接:https://bbs.toot.su/191008.html