Hello,
Pls let me know if this post should not be here.
I am runing centos7 in both VPS A and B. They are both connected to internet
In VPS A, I would like to redirect all TCP traffic matching IPSET AAA to VPS B.
In VPS B, I would like to forword all TCP traffic from VPS A, to internet.
Shall I use bellowed commands in VPS A?
iptables -t mangle -A OUTPUT -p tcp -m set --match-set AAA dst -j DNAT --to-destination VPSB IP
iptables -t nat -A POSTROUTING -j MASQUERADE
And in VPS B,
What commands shall I need to use so that the traffic from VPS A can be forwarded to internet?
thank you!
Pls let me know if this post should not be here.
I am runing centos7 in both VPS A and B. They are both connected to internet
In VPS A, I would like to redirect all TCP traffic matching IPSET AAA to VPS B.
In VPS B, I would like to forword all TCP traffic from VPS A, to internet.
Shall I use bellowed commands in VPS A?
iptables -t mangle -A OUTPUT -p tcp -m set --match-set AAA dst -j DNAT --to-destination VPSB IP
iptables -t nat -A POSTROUTING -j MASQUERADE
And in VPS B,
What commands shall I need to use so that the traffic from VPS A can be forwarded to internet?
thank you!