A shell script to create chroot jails

2020-04-19 Thread Zhi-Qiang Lei
Hi, I wrote a script to create chroot jails. Please feel free to use and comment. Thanks. https://gist.github.com/siegfried/907904752b1b5db760782f476f44fca4 Sincerely yours, Siegfried zhiqiang@gmail.com

Re: A shell script to create chroot jails

2020-04-21 Thread Zhi-Qiang Lei
nka wrote: > > On Sun, Apr 19, 2020 at 08:30:11AM BST, Zhi-Qiang Lei wrote: >> Hi, >> >> I wrote a script to create chroot jails. Please feel free to use and >> comment. Thanks. >> >> https://gist.github.com/siegfried/907904752b1b5db760782f476f44fca4 >>

Write to DVD-RAM

2019-07-24 Thread Zhi-Qiang Lei
Hi, I’m trying to encrypt a DVD-RAM before putting some files onto it on my OpenBSD 6.5 desktop. But neither dd nor disklabel seems able to work on the drive. Did I miss something? $ dmesg | grep cd cd0 at scsibus3 targ 1 lun 0: ATAPI 5/cdrom removable serial.13fd3940302020202020 cd0 at scsibu

Re: Write to DVD-RAM

2019-07-25 Thread Zhi-Qiang Lei
On Jul 25, 2019, at 10:24 PM, gwes wrote: > > > On 7/24/19 10:19 PM, Zhi-Qiang Lei wrote: >> Hi, I’m trying to encrypt a DVD-RAM before putting some files onto it on my >> OpenBSD 6.5 desktop. But neither dd nor disklabel seems able to work on the >>

Re: Write to DVD-RAM

2019-07-29 Thread Zhi-Qiang Lei
tools like disklabel and mount. Look at the list of ioctl’s > supported in the man page. It talks of tracks of data (like audio tracks) > and such. > > -Brian > > On Jul 26, 2019, at 8:23 PM, gwes mailto:g...@oat.com>> wrote: > >> >> >>

Re: Home NAS

2019-11-15 Thread Zhi-Qiang Lei
I have a HP Gen8 Microserver running as a NAS using OpenBSD. It has been serving well for like 5 months. I choose OpenBSD over FreeBSD because: 1. FreeBSD was my first consideration because of ZFS, but as far as I know, ZFS doesn’t work well with RAID controller, and neither FreeBSD nor OpenBSD

[OpenBSD 6.4][OpenIKED] Route to IPSec tunnel?

2018-12-11 Thread Zhi-Qiang Lei
I’m building a gateway to encrypt some traffics: Client —> Gateway —> VPN Server —> Internet (192.168.1.16) (10.0.0.2) [Gateway] /etc/iked.conf: ikev2 quick active ipcomp esp \ from 10.0.0.2 to 0.0.0.0/0 \ local egress peer $vpn_server_ip \

Re: [OpenBSD 6.4][OpenIKED] Route to IPSec tunnel?

2018-12-12 Thread Zhi-Qiang Lei
encrypt all traffic > that goes across it - from there it's a matter of setting up the > static routes on either side. > On Wed, Dec 12, 2018 at 7:40 AM Zhi-Qiang Lei wrote: >> >> I’m building a gateway to encrypt some traffics: >> >> Client —> Ga

Re: [OpenBSD 6.4][OpenIKED] Route to IPSec tunnel?

2018-12-13 Thread Zhi-Qiang Lei
5519 \ dstid "asgard.local" But ! operator and too many flows are causing error. > On Dec 12, 2018, at 10:37 PM, Zhi-Qiang Lei wrote: > > Hi Aaron, > > Thanks! I also tried gif. But the behavior is quite weird. Through the gif > devices, the gateway and VPN

Re: TLS suddenly not working over IKED site-to-site

2018-12-13 Thread Zhi-Qiang Lei
I’m having the same issue on OpenBSD 6.4. My iked.conf is similar to Rachel’s: include "/etc/iked/macros.conf" ikev2 quick active ipcomp esp proto gre\ from 192.168.1.0/24 to $iked_server \ local egress peer $iked_server \ ikesa auth hmac-sha2-512 enc aes-256 prf hmac-sha2

Re: TLS suddenly not working over IKED site-to-site

2018-12-15 Thread Zhi-Qiang Lei
ec) Verify return code: 0 (ok) --- closed Thanks and best regards, Siegfried > On Dec 14, 2018, at 1:59 PM, Zhi-Qiang Lei wrote: > > I’m having the same issue on OpenBSD 6.4. My iked.conf is similar to Rachel’s: > > include "/etc/iked/macros.conf" > > ikev

Re: [OpenBSD 6.4][OpenIKED] Route to IPSec tunnel?

2018-12-18 Thread Zhi-Qiang Lei
GRE(4) is the one to save. GIF(4) might work as well, but my tunnel setting was not correct. Thanks, Siegfried > On Dec 13, 2018, at 10:15 PM, Zhi-Qiang Lei wrote: > > After changed my from-to selectors in iked configuration, the gateway is > almost working. > > [VPN Serv

Re: TLS suddenly not working over IKED site-to-site - SOLVED?

2019-03-14 Thread Zhi-Qiang Lei
Mine is resolved by applying a smaller max-mss in pf and disabling ipcomp. Only disabling ipcomp didn’t work. > On Mar 15, 2019, at 3:15 AM, Andrew Daugherity > wrote: > > On Thu, Dec 20, 2018 at 6:54 PM Theodore Wynnychenko > wrote: >> Then, I took the advice above, and disable ipcomp on th

Re: IKEv2 Multiple NAT'd Clients

2019-07-06 Thread Zhi-Qiang Lei
You don’t have to configure /etc/hostname.enc0, I think. How about remove it and then check if this happen again? > On Jul 6, 2019, at 3:40 AM, David Anthony wrote: > > Hello, > > I have an IKEv2 VPN server setup with OpenBSD + IKED + PF. Everything is > working properly - a single client dev

Load PF after all networks are ready

2015-01-13 Thread Zhi-Qiang Lei
#block in quick from urpf-failed to any # use with care # By default, do not permit remote connections to X11 block return in on ! lo0 proto tcp to port 6000:6010 ext_if=pppoe0 int_if=vether0 lan=$int_if:network pass out on $ext_if from $lan to any nat-to $ext_if Best regards, Zhi-Qiang Lei

Remote client cannot mount NFS

2015-03-05 Thread Zhi-Qiang Lei
nto /Users/siegfried/mnt: Permission denied What could be the problem? How can I debug it? Thanks. Best regards, Zhi-Qiang Lei

Re: Remote client cannot mount NFS

2015-03-05 Thread Zhi-Qiang Lei
to ver- sion 2 if the mount fails. Best regards, Zhi-Qiang Lei > On Mar 6, 2015, at 1:26 PM, Philip Guenther wrote: > > On Thu, Mar 5, 2015 at 6:52 PM, Zhi-Qiang Lei wrote: >> I simply started a NFS on my OpenBSD 5.6 server as flow: >> >> # cat /etc/

Re: Remote client cannot mount NFS

2015-03-05 Thread Zhi-Qiang Lei
0 100% /dev map -hosts 0Bi0Bi0Bi 100%00 100% /net map auto_home 0Bi0Bi0Bi 100%00 100% /home 192.168.1.1:/nfs 1.7Ti 8.0Ki 1.6Ti 1%1 587389410% /Users/siegfried/mnt Best regards, Zhi-Qiang Lei > On Ma

Re: Remote client cannot mount NFS

2015-03-06 Thread Zhi-Qiang Lei
192.168.1.1:/nfs1.7T8.0K1.6T 0%/mnt # touch /mnt/h.txt touch: /mnt/h.txt: Permission denied Best regards, Zhi-Qiang Lei > On Mar 6, 2015, at 2:51 PM, Zhi-Qiang Lei wrote: > > It works like a charm! Thank you! > > $ sudo mount_nfs -P 192.168.1.1:/nfs mnt > $

Re: Remote client cannot mount NFS

2015-03-06 Thread Zhi-Qiang Lei
(operator), 20(staff), 31(guest) # ls -n /mnt It shows nothing. Best regards, Zhi-Qiang Lei > On Mar 6, 2015, at 6:12 PM, Raf Czlonka wrote: > > ls -n /mnt

Re: Remote client cannot mount NFS

2015-03-06 Thread Zhi-Qiang Lei
Thanks! Setting -mapall=root makes a quick fix! Best regards, Zhi-Qiang Lei > On Mar 6, 2015, at 6:59 PM, Raf Czlonka wrote: > > On Fri, Mar 06, 2015 at 10:48:01AM GMT, Zhi-Qiang Lei wrote: > >> It was root. > > man 5 exports > >In the absence of -mapro

Re: Remote client cannot mount NFS

2015-03-06 Thread Zhi-Qiang Lei
I have created a new user named nfs for that. :P Best regards, Zhi-Qiang Lei > On Mar 6, 2015, at 8:05 PM, Stuart Henderson wrote: > > On 2015-03-06, Zhi-Qiang Lei wrote: >> Thanks! Setting -mapall=root makes a quick fix! > > -mapall=root? Yikes!

Route for a special IP

2015-03-11 Thread Zhi-Qiang Lei
I have a OpenBSD 5.6 router with two external interfaces pppoe0 and tun0. Generally, all packets will go through pppoe0. However, now I have a special client with IP 192.168.1.200, is it possible to force it to use tun0? Thanks. Best regards, Zhi-Qiang Lei

Re: Route for a special IP

2015-03-11 Thread Zhi-Qiang Lei
client on that device, but it has a low frequency CPU. Best regards, Zhi-Qiang Lei > On Mar 12, 2015, at 4:00 AM, Adam Thompson wrote: > > > On 03/11/2015 10:39 AM, Zhi-Qiang Lei wrote: >> I have a OpenBSD 5.6 router with two external interfaces pppoe0 and tun0. >> >&g

Re: Route for a special IP

2015-03-11 Thread Zhi-Qiang Lei
Thank you. This fix my problem. pass in quick from $vip to !192.168.1.0/24 route-to tun0 pass out quick on tun0 from $vip to any nat-to tun0 Best regards, Zhi-Qiang Lei > On Mar 12, 2015, at 4:54 AM, Giancarlo Razzolini wrote: > > On 11-03-2015 12:39, Zhi-Qiang Lei wrote: >> I

Re: Route for a special IP

2015-03-11 Thread Zhi-Qiang Lei
vip="192.168.1.200" pass in quick from $vip to !192.168.1.0/24 route-to tun0 pass out quick on tun0 from $vip to any nat-to tun0 Best regards, Zhi-Qiang Lei > On Mar 12, 2015, at 1:34 PM, Zhi-Qiang Lei wrote: > > Thank you. This fix my problem. > > pass in quick fro

Re: install openbsd to the area made by LINUX's fdisk

2015-03-29 Thread Zhi-Qiang Lei
Thanks for sharing. Best regards, Zhi-Qiang Lei > On Mar 30, 2015, at 2:25 AM, Tuyosi Takesima wrote: > > Hi all. > > this is my little expirience , it may be useful using openbsd & linux in > tha same hard disk . > > I made the openbsd area by LINUX's fdisk. &g

NFS encoding?

2015-07-05 Thread Zhi-Qiang Lei
I have an OpenBSD 5.6 server with NFS enabled. When I mount it on my Mac and Raspberry Pi, everything is fine. However, when I map it on Windows 7, all the filenames with Chinese in them cannot be displayed correctly. How can I fix this? Thanks. Best regards, Zhi-Qiang Lei

Re: NFS encoding?

2015-07-05 Thread Zhi-Qiang Lei
Is there such encoding option in NFS setting? And what encoding does OpenBSD used as default for filenames? Thanks for your suggestion though. Best regards, Zhi-Qiang Lei > On Jul 6, 2015, at 1:02 PM, Johan Petersson wrote: > > that is not a question for the OpenBSD people if you ask

Re: NFS encoding?

2015-07-05 Thread Zhi-Qiang Lei
Looks like there is no resolution but replacement. Thanks. http://superuser.com/questions/302407/what-to-do-with-nfs-server-utf-8-and-wi ndows-7 Best regards, Zhi-Qiang Lei > On Jul 6, 2015, at 1:56 PM, Johan Petersson wrote: > > i really wish i could help you out - my girlfriend live

Booting problem of my OpenBSD 5.7 road warrior

2015-08-23 Thread Zhi-Qiang Lei
-to ($tun_if) Best regards and thanks, Zhi-Qiang Lei

Both PPTP and L2TP on npppd?

2014-10-01 Thread Zhi-Qiang Lei
I’m running a L2TP server using npppd on OpenBSD 5.5. Is it possible to run both PPTP and L2TP using npppd? I tried to append a tunnel for pptp in default configuration then my L2TP could not work. Best regards

Re: npppd ipsec port 500 INVALID_MESSAGE_ID

2014-10-04 Thread Zhi-Qiang Lei
On Oct 4, 2014, at 5:51 PM, mishve...@rambler.ru wrote: > I have OpenBSD 5.4 amd64. I install npppd and configure IPSec(l2tp + > password). > > LAN 192.168.1.1/255.255.255.0 > > WAN(ISP NET; Connect by MAC ddress) 10.0.0.1/255.0.0.0 > > ISP GET ME GLOBAL IP SERVER1-Openbsd - 1.2.3.4 > > WIN 20