[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Не работает ip_forwarding



На компьютере с дебианом пытаюсь сделать форвардинг для виндового ноута.

Форвардинг включен:
# cat /proc/sys/net/ipv4/ip_forward
1

Ip адрес дебиана 192.168.168.1, ноута 192.168.168.2. На ноуте указан шлюз 
192.168.168.1.

Машины друг друга пингуют, но ноут не может выйти в инет. При обращении ноута 
к хосту www.google.ru вывод tcpdump на дебиане показывает вот что:

# tcpdump -a -i eth0 -vvv
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
22:41:26.238662 IP (tos 0x0, ttl 128, id 1628, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  7538+ A? www.google.ru. (31)
22:41:26.353826 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 72) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
2.168.168.192.in-addr.arpa. (44)
22:41:27.230381 IP (tos 0x0, ttl 128, id 1629, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  7538+ A? www.google.ru. (31)
22:41:27.357877 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 72) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
2.168.168.192.in-addr.arpa. (44)
22:41:27.872602 IP (tos 0x0, ttl 128, id 1630, offset 0, flags [none], proto: 
UDP (17), length: 105) 192.168.168.2.1027 > 10.102.11.55.snmp:  { SNMPv1 { 
GetRequest(62) R=5  25.3.2.1.5.1 25.3[|snmp] } }
22:41:28.230456 IP (tos 0x0, ttl 128, id 1631, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  7538+ A? www.google.ru. (31)
22:41:29.358166 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 72) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
2.168.168.192.in-addr.arpa. (44)
22:41:30.230654 IP (tos 0x0, ttl 128, id 1632, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  7538+ A? www.google.ru. (31)
22:41:31.362299 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 70) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
251.0.0.224.in-addr.arpa. (42)
22:41:32.366197 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 70) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
251.0.0.224.in-addr.arpa. (42)
22:41:33.967131 IP (tos 0x0, ttl 128, id 1633, offset 0, flags [none], proto: 
UDP (17), length: 105) 192.168.168.2.1027 > 10.102.11.55.snmp:  { SNMPv1 { 
GetRequest(62) R=5  25.3.2.1.5.1 25.3[|snmp] } }
22:41:34.230869 IP (tos 0x0, ttl 128, id 1634, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  7538+ A? www.google.ru. (31)
22:41:34.362364 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 70) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
251.0.0.224.in-addr.arpa. (42)
22:41:36.438445 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 71) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
55.11.102.10.in-addr.arpa. (43)
22:41:37.442509 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 71) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
55.11.102.10.in-addr.arpa. (43)
22:41:39.442644 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 71) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
55.11.102.10.in-addr.arpa. (43)
22:41:39.967649 IP (tos 0x0, ttl 128, id 1635, offset 0, flags [none], proto: 
UDP (17), length: 105) 192.168.168.2.1027 > 10.102.11.55.snmp:  { SNMPv1 { 
GetRequest(62) R=5  25.3.2.1.5.1 25.3[|snmp] } }
22:41:41.231649 IP (tos 0x0, ttl 128, id 1638, offset 0, flags [none], proto: 
UDP (17), length: 78) 192.168.168.2.netbios-ns > 192.168.168.255.netbios-ns: 
[udp sum ok]
>>> NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
TrnID=0x80CF
OpCode=0
NmFlags=0x11
Rcode=0
QueryCount=1
AnswerCount=0
AuthorityCount=0
AddressRecCount=0
QuestionRecords:
Name=WWW.GOOGLE.RU   NameType=0x00 (Workstation)
QuestionType=0x20
QuestionClass=0x1


22:41:41.446886 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 74) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
255.168.168.192.in-addr.arpa. (46)
22:41:41.981469 IP (tos 0x0, ttl 128, id 1639, offset 0, flags [none], proto: 
UDP (17), length: 78) 192.168.168.2.netbios-ns > 192.168.168.255.netbios-ns: 
[udp sum ok]
>>> NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
TrnID=0x80CF
OpCode=0
NmFlags=0x11
Rcode=0
QueryCount=1
AnswerCount=0
AuthorityCount=0
AddressRecCount=0
QuestionRecords:
Name=WWW.GOOGLE.RU   NameType=0x00 (Workstation)
QuestionType=0x20
QuestionClass=0x1


22:41:42.446896 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 74) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
255.168.168.192.in-addr.arpa. (46)
22:41:42.731518 IP (tos 0x0, ttl 128, id 1640, offset 0, flags [none], proto: 
UDP (17), length: 78) 192.168.168.2.netbios-ns > 192.168.168.255.netbios-ns: 
[udp sum ok]
>>> NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
TrnID=0x80CF
OpCode=0
NmFlags=0x11
Rcode=0
QueryCount=1
AnswerCount=0
AuthorityCount=0
AddressRecCount=0
QuestionRecords:
Name=WWW.GOOGLE.RU   NameType=0x00 (Workstation)
QuestionType=0x20
QuestionClass=0x1


22:41:44.447029 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto: UDP 
(17), length: 74) vasek.local.mdns > 224.0.0.251.mdns: [udp sum ok]  0 PTR? 
255.168.168.192.in-addr.arpa. (46)
22:41:44.620471 IP (tos 0x0, ttl 128, id 1651, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  60276+ A? www.google.ru. (31)
22:41:45.606730 IP (tos 0x0, ttl 128, id 1652, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  60276+ A? www.google.ru. (31)
22:41:45.968024 IP (tos 0x0, ttl 128, id 1653, offset 0, flags [none], proto: 
UDP (17), length: 105) 192.168.168.2.1027 > 10.102.11.55.snmp:  { SNMPv1 { 
GetRequest(62) R=5  25.3.2.1.5.1 25.3[|snmp] } }
22:41:46.606780 IP (tos 0x0, ttl 128, id 1654, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  60276+ A? www.google.ru. (31)
22:41:48.606932 IP (tos 0x0, ttl 128, id 1655, offset 0, flags [none], proto: 
UDP (17), length: 59) 192.168.168.2.1110 > adm.sci-nnov.ru.domain: [udp sum 
ok]  60276+ A? www.google.ru. (31)
22:41:51.971468 IP (tos 0x0, ttl 128, id 1656, offset 0, flags [none], proto: 
UDP (17), length: 105) 192.168.168.2.1027 > 10.102.11.55.snmp:  { SNMPv1 { 
GetRequest(62) R=6  25.3.2.1.5.1 25.3[|snmp] } }
22:42:00.357803 IP (tos 0x0, ttl 128, id 1672, offset 0, flags [none], proto: 
UDP (17), length: 78) 192.168.168.2.netbios-ns > 192.168.168.255.netbios-ns: 
[udp sum ok]
>>> NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
TrnID=0x80D0
OpCode=0
NmFlags=0x11
Rcode=0
QueryCount=1
AnswerCount=0
AuthorityCount=0
AddressRecCount=0
QuestionRecords:
Name=WWW.GOOGLE.RU   NameType=0x00 (Workstation)
QuestionType=0x20
QuestionClass=0x1



Вообще форвардингом пользуюсь постоянно для виртуалок на нескольких 
дебиановских машинах, все замечательно работает. Пока даже не знаю, куда 
копать.



Reply to: