root@SERVER-OVIS:/home/chvalov# sudo dpkg --get-selections
pastebin.com/raw.php?i=0CegZh1Zroot@SERVER-OVIS:/home/chvalov# iptables -L -n -v
Chain INPUT (policy ACCEPT 6788 packets, 349K 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
Chain OUTPUT (policy ACCEPT 11235 packets, 1541K bytes)
pkts bytes target prot opt in out source destination
echo 1 > /proc/sys/net/ipv4/ip_forward
Microsoft Windows [Version 6.1.7601]
(c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены.
C:\Users\Андрей>tracert -d 91.236.248.7
Трассировка маршрута к 91.236.248.7 с максимальным числом прыжков 30
1 6 ms 2 ms 2 ms 10.13.0.251
2 6 ms 4 ms 2 ms 192.168.31.3
3 * * * Превышен интервал ожидания для запроса.
4 * * * Превышен интервал ожидания для запроса.
5 * * * Превышен интервал ожидания для запроса.
6 * * * * * * * * * * *
29 * * * Превышен интервал ожидания для запроса.
30 * * * Превышен интервал ожидания для запроса.
Трассировка завершена.
C:\Users\Андрей>
10.13.0.251 - DNS сервер который выдает дома (13 ветка оптики)sudo apt-get install tcpdump
sudo tcpdump -i ppp0 -vnn icmp
defaultroute
chvalov@SERVER-OVIS:/etc/ppp/peers$ cat dsl-provider
# Minimalistic default options file for DSL/PPPoE connections
noipdefault
defaultroute
replacedefaultroute
hide-password
#lcp-echo-interval 30
#lcp-echo-failure 4
noauth
persist
# ПОВТОРНЫЙ ЗВОНОК
lcp-echo-interval 10
lcp-echo-failure 3
# ПОВТОРНЫЙ ЗВОНОК
#mtu 1492
#persist
#maxfail 0
#holdoff 20
plugin rp-pppoe.so eth0
user "z_server_z"
usepeerdns
chvalov@SERVER-OVIS:/$ sudo tcpdump -i ppp0 -vnn icmp
tcpdump: listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
17:05:05.085991 IP (tos 0x0, ttl 126, id 7458, offset 0, flags [none], proto ICMP (1), length 60)
91.236.248.224 > 91.236.248.7: ICMP echo request, id 1, seq 141, length 40
17:05:09.037382 IP (tos 0xc0, ttl 64, id 20220, offset 0, flags [none], proto ICMP (1), length 159)
91.236.248.7 > 202.78.34.36: ICMP 91.236.248.7 udp port 31198 unreachable, length 139
IP (tos 0x0, ttl 47, id 21308, offset 0, flags [none], proto UDP (17), length 131)
202.78.34.36.47569 > 91.236.248.7.31198: UDP, length 103[|icmp]
17:05:09.800155 IP (tos 0x0, ttl 126, id 7464, offset 0, flags [none], proto ICMP (1), length 60)
91.236.248.224 > 91.236.248.7: ICMP echo request, id 1, seq 142, length 40
17:05:14.801998 IP (tos 0x0, ttl 126, id 7466, offset 0, flags [none], proto ICMP (1), length 60)
91.236.248.224 > 91.236.248.7: ICMP echo request, id 1, seq 143, length 40
17:05:19.803120 IP (tos 0x0, ttl 126, id 7469, offset 0, flags [none], proto ICMP (1), length 60)
91.236.248.224 > 91.236.248.7: ICMP echo request, id 1, seq 144, length 40
^C
5 packets captured
5 packets received by filter
0 packets dropped by kernel
chvalov@SERVER-OVIS:/$
C:\Users\Андрей>ping 91.236.248.7
Обмен пакетами с 91.236.248.7 по с 32 байтами данных:
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Статистика Ping для 91.236.248.7:
Пакетов: отправлено = 4, получено = 0, потеряно = 4
(100% потерь)
C:\Users\Андрей>
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:~$
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#
root@SERVER-OVIS:/home/chvalov# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
root@SERVER-OVIS:/home/chvalov#
netstat -an|grep :80
route del -net 91.236.248.0 gw 10.11.0.251 netmask 255.255.252.0 dev eth0
chvalov@SERVER-OVIS:/$ 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.41 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
chvalov@SERVER-OVIS:/$
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#
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# 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#
Превышен интервал ожидания для запроса.
Ответ от 10.13.0.251: Заданная сеть недоступна.
Ответ от 10.13.0.251: Заданная сеть недоступна.
Ответ от 10.13.0.251: Заданная сеть недоступна.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
10.13.0.251 - Это мой шлюз в локалке. chvalov@SERVER-OVIS:~$ cat /proc/sys/net/ipv4/ip_forward
0
chvalov@SERVER-OVIS:~$
root@SERVER-OVIS:/home/chvalov# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@SERVER-OVIS:/home/chvalov#