root@SERVER-OVIS:/home/chvalov# iptables -A POSTROUTING -t nat -j SNAT --to-source 10.11.1.1 -d 91.236.248.7 -i eth0
iptables v1.4.21: Can't use -i with POSTROUTING
Try `iptables -h' or 'iptables --help' for more information.
root@SERVER-OVIS:/home/chvalov#
chvalov@SERVER-OVIS:~$ ip ro sh ta all
default dev ppp0 scope link
10.0.0.0/8 via 10.11.0.251 dev eth0
10.11.0.0/23 dev eth0 proto kernel scope link src 10.11.1.1
91.236.248.0/22 via 10.11.0.251 dev eth0
91.236.251.41 dev ppp0 proto kernel scope link src 91.236.248.7
172.16.0.0/12 via 10.11.0.251 dev eth0
192.168.0.0/16 via 10.11.0.251 dev eth0
195.5.25.222 via 10.11.0.252 dev eth0
broadcast 10.11.0.0 dev eth0 table local proto kernel scope link src 10.11.1.1
local 10.11.1.1 dev eth0 table local proto kernel scope host src 10.11.1.1
broadcast 10.11.1.255 dev eth0 table local proto kernel scope link src 10.11.1.1
local 91.236.248.7 dev ppp0 table local proto kernel scope host src 91.236.248.7
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
fe80::/64 dev eth0 proto kernel metric 256
unreachable default dev lo table unspec proto kernel metric 4294967295 error -101
local ::1 dev lo table local proto none metric 0
local fe80::76d4:35ff:fe3d:61e4 dev lo table local proto none metric 0
ff00::/8 dev eth0 table local metric 256
unreachable default dev lo table unspec proto kernel metric 4294967295 error -101
chvalov@SERVER-OVIS:~$
ip ruchvalov@SERVER-OVIS:~$ ip ru
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
chvalov@SERVER-OVIS:~$
root@SERVER-OVIS:/home/chvalov# iptables -L -vn -t mangle
Chain PREROUTING (policy ACCEPT 2888 packets, 246K bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 1649 packets, 172K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 TCPMSS tcp -- * ppp0 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 tcpmss match 1400:65495 TCPMSS clamp to PMTU
Chain OUTPUT (policy ACCEPT 390 packets, 74896 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 390 packets, 74896 bytes)
pkts bytes target prot opt in out source destination
root@SERVER-OVIS:/home/chvalov#
chvalov@SERVER-OVIS:~$ ip ro sh
default dev ppp0 scope link
10.0.0.0/8 via 10.11.0.251 dev eth0
10.11.0.0/23 dev eth0 proto kernel scope link src 10.11.1.1
91.236.251.44 dev ppp0 proto kernel scope link src 91.236.248.7
172.16.0.0/12 via 10.11.0.251 dev eth0
192.168.0.0/16 via 10.11.0.251 dev eth0
195.5.25.222 via 10.11.0.252 dev eth0
chvalov@SERVER-OVIS:~$
root@SERVER-OVIS:/home/chvalov# tcpdump -i ppp0 -vnn icmp
tcpdump: listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
18:05:38.247203 IP (tos 0x0, ttl 126, id 15425, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 554, length 40
18:05:43.242006 IP (tos 0x0, ttl 126, id 15427, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 555, length 40
18:05:48.244510 IP (tos 0x0, ttl 126, id 15429, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 556, length 40
18:05:53.246786 IP (tos 0x0, ttl 126, id 15431, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 557, length 40
18:05:58.246360 IP (tos 0x0, ttl 126, id 15433, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 558, length 40
18:06:03.244469 IP (tos 0x0, ttl 126, id 15435, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 559, length 40
18:06:05.068722 IP (tos 0x0, ttl 123, id 3188, offset 0, flags [none], proto ICMP (1), length 60)
89.248.169.8 > 91.236.248.7: ICMP echo request, id 67, seq 39733, length 40
18:06:05.068784 IP (tos 0x0, ttl 64, id 56815, offset 0, flags [none], proto ICMP (1), length 60)
91.236.248.7 > 89.248.169.8: ICMP echo reply, id 67, seq 39733, length 40
18:06:08.241186 IP (tos 0x0, ttl 126, id 15438, offset 0, flags [none], proto ICMP (1), length 60)
10.13.1.186 > 91.236.248.7: ICMP echo request, id 1, seq 560, length 40
10.13.1.186 - Это мой локальный ип домашнего ПК root@SERVER-OVIS:/home/chvalov# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
10.0.0.0 10.11.0.251 255.0.0.0 UG 0 0 0 eth0
10.11.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
91.236.248.0 10.11.0.251 255.255.252.0 UG 0 0 0 eth0
91.236.251.42 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.16.0.0 10.11.0.251 255.240.0.0 UG 0 0 0 eth0
192.168.0.0 10.11.0.251 255.255.0.0 UG 0 0 0 eth0
195.5.25.222 10.11.0.252 255.255.255.255 UGH 0 0 0 eth0
root@SERVER-OVIS:/home/chvalov#
перезарузка также ничего не дает (