🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.linux.sieci
Article #231692

Problem z routingiem

#231692
From: Alakdae
Date: Sun, 09 Dec 2007 11:18
126 lines
5840 bytes
Witam,

Mam następujący sieci i serwery:

SerwerA
1: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
     link/ether 00:40:63:d6:4f:b5 brd ff:ff:ff:ff:ff:ff
     inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0
     inet6 fe80::240:63ff:fed6:4fb5/64 scope link
        valid_lft forever preferred_lft forever
2: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
     inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
     link/ether 00:c0:26:a8:d1:44 brd ff:ff:ff:ff:ff:ff
     inet 80.xxx.xxx.xxx/30 brd 80.xxx.xxx.xxx scope global eth1
     inet6 fe80::2c0:26ff:fea8:d144/64 scope link
        valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop
     link/sit 0.0.0.0 brd 0.0.0.0
5: gre0: <NOARP> mtu 1476 qdisc noop
     link/gre 0.0.0.0 brd 0.0.0.0
7: tunl0: <NOARP> mtu 1480 qdisc noop
     link/ipip 0.0.0.0 brd 0.0.0.0
10: tunnel0@NONE: <POINTOPOINT,NOARP,UP> mtu 1480 qdisc noqueue
     link/ipip 80.xxx.xxx.xxx peer 80.yyy.yyy.yyy
     inet 192.168.69.2/30 scope global tunnel0


Routing:
192.168.69.0/30 dev tunnel0  proto kernel  scope link  src 192.168.69.2
80.xxx.xxx.xxx/30 dev eth1  proto kernel  scope link  src 80.xxx.xxx.xxx
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
192.168.0.0/24 dev tunnel0  scope link
239.0.0.0/8 dev eth0  scope link
127.0.0.0/8 dev lo  scope link
default via 80.xxx.xxx.xxx dev eth1


NAT:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
SNAT       all  --  192.168.1.0/24       anywhere 
to:80.xxx.xxx.xxx

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


SerwerB
1: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
qlen 1000
     link/ether 00:13:20:42:a7:08 brd ff:ff:ff:ff:ff:ff
     inet 192.168.0.1/24 brd 192.168.0.255 scope global eth0
     inet6 fe80::213:20ff:fe42:a708/64 scope link
        valid_lft forever preferred_lft forever
2: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
     inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
qlen 1000
     link/ether 00:c0:26:a8:c9:29 brd ff:ff:ff:ff:ff:ff
     inet 80.yyy.yyy.yyy/29 brd 80.yyy.yyy.yyy scope global eth1
     inet6 fe80::2c0:26ff:fea8:c929/64 scope link
        valid_lft forever preferred_lft forever
4: tunl0: <NOARP> mtu 1480 qdisc noop
     link/ipip 0.0.0.0 brd 0.0.0.0
5: gre0: <NOARP> mtu 1476 qdisc noop
     link/gre 0.0.0.0 brd 0.0.0.0
6: sit0: <NOARP> mtu 1480 qdisc noop
     link/sit 0.0.0.0 brd 0.0.0.0
9: tunnel0@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue
     link/ipip 80.yyy.yyy.yyy peer 80.xxx.xxx.xxx
     inet 192.168.69.1/30 scope global tunnel0


Routing:
192.168.69.0/30 dev tunnel0  proto kernel  scope link  src 192.168.69.1
80.yyy.yyy.yyy/29 dev eth1  proto kernel  scope link  src 80.yyy.yyy.yyy
192.168.1.0/24 via 192.168.69.2 dev tunnel0  src 192.168.0.1
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.1
127.0.0.0/8 dev lo  scope link
default via 80.yyy.yyy.yyy dev eth1


NAT:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
SNAT       all  --  localhost/24         anywhere 
to:80.yyy.yyy.yyy

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination





Problem wygląda tak:
Z serwera A mogę pingować adresy 192.168.69.0/30 oraz wszystko co jest 
po stronie serwera B używając adresu z 192.168.0.0/24 bez problemów.
Z serwera B mogę pingować tylko adresy z tunelu czyli 192.168.69.0/30, a 
nie chodzi ping do 192.168.1.0/24 oprócz adresu serweraA czyli 
192.168.1.1. W tcpdump na serwerzeA widać, że pingi wychodzą ale nic nie 
wraca do serwera (zły source?)
Komputery mają default gateway ustawione na swoje serwery i na nich jest 
następujący problem:
Z komputerów będących w sieciach 192.168.0.0/24 i 192.168.1.0/24 nie 
można pingować komputerów z drugiej strony tunelu, ALE można pingować 
adres tunelu z drugiej strony czyli np 192.168.69.1 z komputera w 
192.168.1.0/24. Natomiast pingowanie adresu 192.168.0.1 (czyli ten sam 
serwerB co adres tunelu powyżej) już nie działa. TCPDUMP pokazuje 
pakiety tylko dochodzące do serweraB i dalej nic.

Jak ktoś ma jakiś pomysł to byłbym bardzo wdzięczny bo walczę z tym już 
jakiś czas i różne kombinacje próbowałem ale nic to nie daje.
Technical Details
Message-ID: <fjgj9r$svp$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!opal.futuro.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!opal.futuro.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Alakdae <alakdae@No-Spampjwstk.edu.pl>
Newsgroups: pl.comp.os.linux.sieci
Subject: Problem z routingiem
Date: Sun, 09 Dec 2007 12:18:29 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 126
Message-ID: <fjgj9r$svp$1@nemesis.news.tpi.pl>
NNTP-Posting-Host: pu238.internetdsl.tpnet.pl
Mime-Version: 1.0
X-Trace: nemesis.news.tpi.pl 1197199484 29689 80.55.20.238 (9 Dec 2007 11:24:44 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Sun, 9 Dec 2007 11:24:44 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit