Hi everyone,

i found a relatively easy way to implement divert sockets on
openbsd...through a help of some users on misc forum.

I have the following setup:

client1---------(fxp1)[ipsec-bridge1](fxp0)---------(fxp0)[ipsec-bridge2](fxp1)---client2

ipsec bridges were built after example in "man brconfig"
brconfig bridge0 add gif0 add fxp1
ifconfig gif0 giftunnel 10.10.10.10 10.10.10.11

ifconfig fxp1 up
ifconfig gif0 up
brconfig bridge0 up
isakmpd -d -DA=8

I added this in pf.conf

block return log on gif0 all
(route all packets on gif0 to pflog0 in order to maniuplate them with
pcap in userland, and inject them back)

But i noticed tcpdump on interfaces shows different results,why is
that?i thought it should be the same:

# tcpdump -i gif0
tcpdump: WARNING: gif0: no IPv4 address assigned
tcpdump: listening on gif0
21:27:04.421685 arp who-has 10.10.10.11 tell 10.10.10.10 (0:50:da:51:7d:15)
21:27:05.423000 arp who-has 10.10.10.11 tell 10.10.10.10 (0:50:da:51:7d:15)
21:27:06.424409 arp who-has 10.10.10.11 tell 10.10.10.10 (0:50:da:51:7d:15)
21:27:07.425720 arp who-has 10.10.10.11 tell 10.10.10.10 (0:50:da:51:7d:15)
21:27:08.427126 arp who-has 10.10.10.11 tell 10.10.10.10 (0:50:da:51:7d:15)
21:27:09.428448 arp who-has 10.10.10.11 tell 10.10.10.10 (0:50:da:51:7d:15)

////////////////////////////////////////////////

# tcpdump -i pflog0
tcpdump: WARNING: pflog0: no IPv4 address assigned
tcpdump: listening on pflog0
21:27:59.596418 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:27:59.596431 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:01.599147 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:01.599161 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:03.601867 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:03.601881 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:05.604607 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:05.604619 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:07.607318 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:28:07.607330 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44

//////////////////////////////////

# tcpdump -i fxp1
tcpdump: WARNING: fxp1: no IPv4 address assigned
tcpdump: listening on fxp1
21:29:06.587952 arp who-has 10.10.10.11 tell 10.10.10.10
21:29:07.589268 arp who-has 10.10.10.11 tell 10.10.10.10
21:29:07.689091 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:29:08.590694 arp who-has 10.10.10.11 tell 10.10.10.10
21:29:09.591992 arp who-has 10.10.10.11 tell 10.10.10.10
21:29:09.691831 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
21:29:10.593408 arp who-has 10.10.10.11 tell 10.10.10.10
21:29:11.594725 arp who-has 10.10.10.11 tell 10.10.10.10
21:29:11.694563 10.10.10.10.1025 > 255.255.255.255.34012:  udp 44
     


Reply via email to