благодарю за ответ. Только я слабо понимаю что я должен сделать в nat. Насколько я понял, правила прописываются для маршрутизации к внутренним сетям. А у меня задача использовать на сервере А public адреса с Б. Сервер А:
[root@la ~]# ifconfig
gretun Link encap:UNSPEC HWaddr AD-D6-A1-91-00-00-E1-2E-00-00-00-00-00-00-00-00
inet addr:172.31.1.2 P-t-P:172.31.1.0 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MTU:1476 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:672 (672.0 b) TX bytes:10584 (10.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1176 (1.1 KiB) TX bytes:1176 (1.1 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:480 errors:0 dropped:0 overruns:0 frame:0
TX packets:418 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43010 (42.0 KiB) TX bytes:52972 (51.7 KiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:173.y.y.145 P-t-P:173.y.y.145 Bcast:173.y.y.145 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
Вот сервер Б:
[root@nj ~]# ifconfig
gretun Link encap:UNSPEC HWaddr CE-48-CA-B2-00-00-E1-FE-00-00-00-00-00-00-00-00
inet addr:172.31.1.1 P-t-P:172.31.1.0 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MTU:1476 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1176 (1.1 KiB) TX bytes:1008 (1008.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:132 errors:0 dropped:0 overruns:0 frame:0
TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9053 (8.8 KiB) TX bytes:9053 (8.8 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:26344 errors:0 dropped:0 overruns:0 frame:0
TX packets:22224 errors:0 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9158007 (8.7 MiB) TX bytes:3008928 (2.8 MiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:206.x.x.178 P-t-P:206.x.x.178 Bcast:206.x.x.178 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:206.x.x.180 P-t-P:206.x.x.180 Bcast:206.x.x.180 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1