<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Cipe sending packets to wrong host
From: Roman <roman,AT,batmap,DOT,com>
Date: Mon, 16 Jul 2001 14:09:14 +0200

 Hi.

 I'm trying to establish a CIPE connection between A and D with the
following scheme:

 A <--> B <--> Internet <--> C <--> D
 where:

A:
- is a linux PC with CIPE
- right: 192.168.5.w
B:
- is an ADSL router (performing NAT to provide access to Internet)
- left: 192.168.5.s
- right: 213.97.198.x
C:
- is a special device doing a kind of "redirection": packets sent to
left interface are parsed changing real dst ip to private ip (the one
D has) and then forwarded to D (so D thinks the packet was really for
"him"). Packets received on the right interface are sent via the left
interface with a simple NAT
- left: 62.22.78.y
- right: 192.168.2.t
D:
- is a linux PC with CIPE
- left: 192.168.2.z

(letters mean an integer number < 255 and > 0. Hidden to protect the
innocent ;-))

 I've made the following /etc/cipe/options:
Host A:
hostA:/etc/cipe # cat options
# Fichero configuracion CIPE A

# Without a "device" line, the device is picked dynamically

# the peer's IP address
ptpaddr         192.168.7.254
# our CIPE device's IP address
ipaddr          192.168.6.254
# my UDP address. Note: if you set port 0 here, the system will pick
# one and tell it to you via the ip-up script. Same holds for IP
0.0.0.0.
me              192.168.5.w:53666
# ...and the UDP address we connect to. Of course no wildcards here.
peer            62.22.78.y:53666
# The static key. Keep this file secret!
# The key is 128 bits in hexadecimal notation.
key             3248fd20adf9c00ccf9ecxxxxxxxxxxx

Host D:
hostD:/etc/cipe # cat options
# Fichero configuracion CIPE D

# Without a "device" line, the device is picked dynamically

# the peer's IP address
ptpaddr         192.168.6.254
# our CIPE device's IP address
ipaddr          192.168.7.254
# my UDP address. Note: if you set port 0 here, the system will pick
# one and tell it to you via the ip-up script. Same holds for IP
0.0.0.0.
me              192.168.2.z:53666
# ...and the UDP address we connect to. Of course no wildcards here.
peer            213.97.198.x:53666
# The static key. Keep this file secret!
# The key is 128 bits in hexadecimal notation.
key             3248fd20adf9c00ccfxxxxxxxxxxxxxx

 The problem is that the communication works in one direction (A->D)
and not in the reverse path (D->A). I've done a little debug and I
found at D the following:

Jul 16 13:48:18 hostD kernel: cipcb0: sending 132 from
213.97.198.x:53666 to 1.0.0.0:53666
Jul 16 13:48:18 hostD kernel: sending: packet len=132 dev=cipcb0
Jul 16 13:48:18 hostD kernel:  0000:  4500 0084 5440 0000  ff11 ca3d
d561 c689  E...T@..ÿ.Ê=ÕaÆ.

 The interesant part is "from 213.97.198.x:53666 to 1.0.0.0:53666"
 :-???? This explains why the reverse connection doesn't work because
it's all wrong!!! 
1) I haven't specified any "1.0.0.0" !!! :-??
2) It should be read "from 192.168.2.z:53666 to 213.97.198.x:53666".
Why is CIPE using other src & dst IPs?????????

Roman.-





<< | Thread Index | >> ]    [ << | Date Index | >> ]