NetBSD-Bugs archive

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

Re: kern/53199: stateful npf

The following reply was made to PR kern/53199; it has been noted by GNATS.

From: Patrick Welche <>
Subject: Re: kern/53199: stateful npf
Date: Fri, 4 May 2018 15:05:04 +0100

 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 The attached rump based script works. Trying the same on a NetBSD-8.99.15/amd64
 webserver with two wm(4), and as the client, doesn't.
 Running out of ideas...
 Content-Type: application/x-sh
 Content-Disposition: attachment; filename=""
 Content-Transfer-Encoding: quoted-printable
 # =0A# webserver ----- client =0A=0Asock_webser=
 =0Awire1=3D/tmp/netbus1=0A=0A#inetserver=3D"rump_server -lrumpnet -lrumpnet=
 _net -lrumpnet_netinet -lrumpnet_shmif"=0Ainetserver=3Drump_allserver=0A=0A=
 ${inetserver} ${sock_webserver}=0Aexport RUMP_SERVER=3D${sock_webserver}=0A=
 rump.ifconfig shmif0 create=0Arump.ifconfig shmif0 linkstr $wire1=0Arump.if=
 config shmif0 inet netmask 0xffffff00=0A=0Acat > /tmp/npf.conf =
 << EOF=0Aset bpf.jit off=0A=0Agroup "ext" on shmif0 {=0A  block in all=0A  =
 pass stateful in proto tcp flags S/SA from any to port 80=0A}=
 =0A=0Agroup default {=0A  pass all =0A}=0AEOF=0A=0Aexport 'RUMPHIJACK=3Dpat=
 h=3D/rump,blanket=3D/dev/npf,socket=3Dall:nolocal,sysctl=3Dyes'=0Aenv LD_PR=
 ELOAD=3D/usr/lib/ \=0A  /sbin/npfctl validate /tmp/npf.conf=
 =0Aenv LD_PRELOAD=3D/usr/lib/ \=0A  /sbin/npfctl reload /tm=
 p/npf.conf=0Aenv LD_PRELOAD=3D/usr/lib/ \=0A  /sbin/npfctl =
 start=0A=0Acat > /tmp/webserver.html << EOF=0A<html>=0A<head>=0A<title>webs=
 erver</title>=0A</head>=0A<body>=0AHello from webserver!=0A</body>=0A</html=
 >=0AEOF=0A=0Aenv LD_PRELOAD=3D/usr/lib/ \=0A  /usr/libexec/=
 httpd -d -P -i -f -b -s /tmp &=0A=0A${inetserver} ${s=
 ock_client}=0Aexport RUMP_SERVER=3D$sock_client=0Arump.ifconfig shmif0 crea=
 te=0Arump.ifconfig shmif0 linkstr $wire1=0Arump.ifconfig shmif0 inet 192.16=
 8.0.2 netmask 0xffffff00=0Aenv LD_PRELOAD=3D/usr/lib/ \=0A =
  /usr/bin/ftp -4 -n -d -o out ''=0A=0Akill=
  `cat`=0A=0Afor box in ${sock_webserver} ${sock_client}; do=0A	ex=
 port RUMP_SERVER=3D${box}=0A	rump.halt=0Adone=0A

Home | Main Index | Thread Index | Old Index