Re: keyboard layout 6.1 obsd

2017-08-17 Thread Peter Hessler
xenodm uses .xsession instead of .xinitrc.

I highly recommend symlinking them, so both of them one have the same
environment.


On 2017 Aug 17 (Thu) at 17:19:05 -0300 (-0300), Friedrich Locke wrote:
:It did not work.
:
:On Thu, Aug 17, 2017 at 11:49 AM, Matias Moreno Meringer <
:mmoren...@gmail.com> wrote:
:
:> I use an US keyboard with dead keys in X. In order to make it work, I have
:> the following statement in my ~/.xinitrc:
:>
:> setxkbmap -layout us -variant altgr-intl
:>
:> Test it with layout br for your case; it should work.
:>
:>
:> On Thu, Aug 17, 2017 at 11:07 AM, Friedrich Locke <
:> friedrich.lo...@gmail.com> wrote:
:>
:>> Hi folks,
:>>
:>> i have just installed obsd 6.1 amd64. My keyboard is set as "br" in
:>> /etc/kbdtype and it is working 100% on the console.
:>>
:>> But when i start xenodm, it is not working for "br" ! Do you know where i
:>> should set X to start it working with "br" keyboards.
:>>
:>> Thanks in advance.
:>>
:>
:>

-- 
Life:  loathe it or ignore it, you can't like it.
-- Marvin, "Hitchhiker's Guide to the Galaxy"



[PATCH] Off-by-one bug in httpd's config file port number checking

2017-08-17 Thread Kris Katterjohn
Hello,

I think I've found an off-by-one bug in httpd: it cannot listen on port
65535 when the port is specified as a number (although it can listen on
it if specified as the string "65535", or if an appropriate line is
added to /etc/services and it's specified with that name).

$ uname -a
OpenBSD Meryl 6.1 GENERIC.MP#19 amd64

$ cat /etc/httpd.conf
server "default" {
  listen on egress port 65535
}

$ doas httpd -n
/etc/httpd.conf:2: invalid port: 65535
no actions, nothing to do


The above is on 6.1, but it looks like the problem still exists in CVS.

Below is a patch (or the possible start of one).  It's untested as I
cannot do a build and test it right now, but I think it's enough.  If
not, I hope it's at least a little helpful.  Let me know if there is
anything else I can do and I'll try to do it whenever I can.

Thanks,
Kris Katterjohn

Index: usr.sbin/httpd/parse.y
===
RCS file: /cvs/src/usr.sbin/httpd/parse.y,v
retrieving revision 1.91
diff -u -p -r1.91 parse.y
--- usr.sbin/httpd/parse.y  11 Aug 2017 18:48:56 -  1.91
+++ usr.sbin/httpd/parse.y  18 Aug 2017 04:10:35 -
@@ -1118,7 +1118,7 @@ medianamesl   : numberstring  
{
;
 
 port   : PORT NUMBER {
-   if ($2 <= 0 || $2 >= (int)USHRT_MAX) {
+   if ($2 <= 0 || $2 > (int)USHRT_MAX) {
yyerror("invalid port: %lld", $2);
YYERROR;
}



Re: OpenBSD 6.1 on Asus E200HA (SoC Intel z8350)

2017-08-17 Thread Pedro Ramos

Às 15:28 de 17/08/2017, Stefan Sperling escreveu:

On Thu, Aug 17, 2017 at 02:53:09PM +0100, Pedro Ramos wrote:

Hello,
I am having troubles making the Asus E200HA (SoC Intel z8350) keyboard work
correctly on OpenBSD 6.1.

OpenBSD does detect the keyboard and it works at boot time during
installation. But as soon it gets to the installer prompt the keyboard does
not work any more.

Any idea how to fix this issue? Thanks.

Best regards,
Pedro Ramos


This was fixed in -current yesterday.
I would recommend -current on this machine anyway as it contains
relatively new hardware.


Hello  Stefan,
I have test it just now and the keyboard is working, Thanks.

Best regards,
Pedro Ramos



Re: keyboard layout 6.1 obsd

2017-08-17 Thread Maksym Sheremet
Try to create/customize the xorg.conf(5) file. See kbd(4) for keyboard
options.

On Thu, 17 Aug 2017 11:07:38 -0300
Friedrich Locke  wrote:

> Hi folks,
> 
> i have just installed obsd 6.1 amd64. My keyboard is set as "br" in
> /etc/kbdtype and it is working 100% on the console.
> 
> But when i start xenodm, it is not working for "br" ! Do you know where i
> should set X to start it working with "br" keyboards.
> 
> Thanks in advance.



Re: Full disk encryption questions

2017-08-17 Thread Ted Unangst
Philippe Meunier wrote:
> - is the panic intended (well, known to the developers and considered
> normal; I hesitate to call it a feature) or is it an oversight?

no, nothing bioctl does should kill init like that.

> - I would have thought that, once the softraid volume has been created, its
> metadata wouldn't need to change (unless the passphrase is changed, or the
> volume is roaming, as seen above). Any idea why part of it gets trashed?

that's true, but maybe a stray write killed it?

> - is there a way to get the computer to boot again, short of wiping the
> disk with dd and starting from scratch again?

you can run installboot. use the softraid disk name.



Re: vmm workflow

2017-08-17 Thread Carlos Cardenas
Thanks Bryan and Mike.

I'll stick to what y'all are suggesting.

Is there a page for the vmm roadmap?  I am interested in advancing vmm and
would like to participate in its development.

+--+
Carlos

On Aug 17, 2017 12:48, "Mike Larkin"  wrote:

On Wed, Aug 16, 2017 at 07:50:59PM -0700, Carlos Cardenas wrote:
> Howdy.
>
> I've been playing around with vmm(4) on 6.1 and have noticed a few
> things that seem odd.
>
> Take the following vm.conf:
> ramdisk="/home/los/vmm/bsd.rd-current"
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> boot $ramdisk
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
>
> Doing vmd -n yields:
> /etc/vm.conf:6: syntax error
>
> Removing the boot line yields a warning about unused macro (referring
> to ramdisk).
>
> So now my config is:
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
>
> vmd(8) is happy and am expecting
> vmctl start "test.vm" -b "/home/los/vmm/bsd.rd-current" -c
> to work since all the other params have been defined in vm.conf.
>
> Instead I get:
> vmctl: starting without disks
> vmctl: starting without network interfaces
> vmctl: start vm command failed: Operation not permitted
>
> Increasing verbose log on vmd gets me:
> startup
> /etc/vm.conf:4: switch "local" registered
> /etc/vm.conf:11: vm "test.vm" registered (disabled)
> vm_priv_brconfig: interface bridge0 description switch1-local
> vm_priv_brconfig: interface bridge0 add vether0
> vmd_configure: not creating vm test.vm (disabled)
> denied request 3 from uid 1000
>
> However, if I perform a "doas vmctl start" first (along with
> install) and then define it in vm.conf, "vmctl start 'test.vm'" works as
> expected.
>
> What is the expected workflow for vmm?
>
> Any ideas on why the boot $ramdisk line is error'ing out?
>
> +--+
> Carlos
>

You can't yet specify part of the parameter list in vm.conf and override or
supplement that later with command line arguments to vmctl. So the thing
that
is breaking you is the -b option on your command line.

I don't know why the macro expansion is failing.

Note that the ability to supplement config options is something we planned
to
do at some point, just haven't got there yet. There are questions to be
answered about how that interacts with the "owner" concept. For now, either
specify all the VM config on the command line, or all of it in vm.conf.
Don't
mix and match.

-ml


Re: keyboard layout 6.1 obsd

2017-08-17 Thread Friedrich Locke
It did not work.

On Thu, Aug 17, 2017 at 11:49 AM, Matias Moreno Meringer <
mmoren...@gmail.com> wrote:

> I use an US keyboard with dead keys in X. In order to make it work, I have
> the following statement in my ~/.xinitrc:
>
> setxkbmap -layout us -variant altgr-intl
>
> Test it with layout br for your case; it should work.
>
>
> On Thu, Aug 17, 2017 at 11:07 AM, Friedrich Locke <
> friedrich.lo...@gmail.com> wrote:
>
>> Hi folks,
>>
>> i have just installed obsd 6.1 amd64. My keyboard is set as "br" in
>> /etc/kbdtype and it is working 100% on the console.
>>
>> But when i start xenodm, it is not working for "br" ! Do you know where i
>> should set X to start it working with "br" keyboards.
>>
>> Thanks in advance.
>>
>
>


Re: OpenBSD-based ISP

2017-08-17 Thread Juan Guillermo Narvaez
Stuart,

Where I can set the port range of NAT?

Greetings

On Thu, Aug 17, 2017 at 5:04 AM, Stuart Henderson 
wrote:

> On 2017-08-16, Juan Guillermo Narvaez  wrote:
> > *match out on bge0 inet from 172.21.0.0/19  to any
> > nat-to 200.91.35.55*
>
> natting a whole /19 to a single address, especially with the default port
> range
> 50001-65535, isn't going to work well.
>
> I'd suggest at least using a dedicated IP (not used for services or locally
> sourced connections) with "port 1024:65535", if not multiple IPs.
>
> As already mentioned, check your state limit. Also check sysctl
> net.inet.ip.ifq,
> if there are drops you may need to increase the queue size.
>
>
>


-- 
J. Guillermo Narvaez
@_aran0id


Re: OpenBSD-based ISP

2017-08-17 Thread Hrvoje Popovski
On 17.8.2017. 21:56, Juan Guillermo Narvaez wrote:
> Sure Hrvoje, I'm applying every config and looking the performance
> improvement. I will post my final configuration when finish.
> 
> Thanks!
> 

If you do not filter anything on the internal interfaces in pf.conf you
could skip them

set skip on { lo bge1 vlan123 vlan124 }


> On Thu, Aug 17, 2017 at 4:45 PM, Hrvoje Popovski  wrote:
> 
>> On 17.8.2017. 21:23, Juan Guillermo Narvaez wrote:
>>> This is the dmesg.boot.
>>
>> nice box with nice cpu and interfaces ... :)
>>
>> if you can, disable Hyper Threading ..
>>
>>> In pf.conf:
>>> set debug notice
>>
>> default is error
>>
>> when you do all that what people have told you, i would be interested if
>> you see some performance improvement?
>>
>>
>>
>>> On Thu, Aug 17, 2017 at 3:46 PM, Hrvoje Popovski  wrote:
>>>
 On 17.8.2017. 17:13, Chris Cappuccio wrote:
> Juan Guillermo Narvaez [guille...@nrvz.net] wrote:
>> # sysctl | grep ifq
>> net.inet.ip.ifq.len=0
>> net.inet.ip.ifq.maxlen=1024
>> net.inet.ip.ifq.drops=46068291
>> net.inet6.ip6.ifq.len=0
>> net.inet6.ip6.ifq.maxlen=256
>> net.inet6.ip6.ifq.drops=0
>>
>
> The drops are high. You probably want a higher maxlen. I use 8192 on
>> busy
> forwarding boxes.
>
>> # cat sysctl.conf
>> net.inet.ip.forwarding=1
>> kern.bufcachepercent=90
>> net.ip.ifq.maxlen=1024
>>
>
> You want net.inet.ip.ifq.maxlen=8192 not 'net.ip.ifq.maxlen=1024'
>

 besides what chris told you maybe you could silence pf logging... your
 dmesg is full of pf logs, maybe you have pf debuging enabled?

 please send cat /var/run/dmesg.boot inline just to see which version of
 openbsd your running and on which hardware ...

 and set your pf states to some big number.. set limit states 10 or
 something like that ..

 and of course run at least openbsd 6.1 or if you brave enough run
 -current 

 just side note, openbsd on E5-2643 v2 @ 3.50GHz from around February
 2017 had plain forwarding performance of 1.4Mpps and openbsd from today
 on same box can forward cca 1.7Mpps ...






>>>
>>>
>>
>>
> 
> 



Re: OpenBSD-based ISP

2017-08-17 Thread Juan Guillermo Narvaez
Sure Hrvoje, I'm applying every config and looking the performance
improvement. I will post my final configuration when finish.

Thanks!

On Thu, Aug 17, 2017 at 4:45 PM, Hrvoje Popovski  wrote:

> On 17.8.2017. 21:23, Juan Guillermo Narvaez wrote:
> > This is the dmesg.boot.
>
> nice box with nice cpu and interfaces ... :)
>
> if you can, disable Hyper Threading ..
>
> > In pf.conf:
> > set debug notice
>
> default is error
>
> when you do all that what people have told you, i would be interested if
> you see some performance improvement?
>
>
>
> > On Thu, Aug 17, 2017 at 3:46 PM, Hrvoje Popovski  wrote:
> >
> >> On 17.8.2017. 17:13, Chris Cappuccio wrote:
> >>> Juan Guillermo Narvaez [guille...@nrvz.net] wrote:
>  # sysctl | grep ifq
>  net.inet.ip.ifq.len=0
>  net.inet.ip.ifq.maxlen=1024
>  net.inet.ip.ifq.drops=46068291
>  net.inet6.ip6.ifq.len=0
>  net.inet6.ip6.ifq.maxlen=256
>  net.inet6.ip6.ifq.drops=0
> 
> >>>
> >>> The drops are high. You probably want a higher maxlen. I use 8192 on
> busy
> >>> forwarding boxes.
> >>>
>  # cat sysctl.conf
>  net.inet.ip.forwarding=1
>  kern.bufcachepercent=90
>  net.ip.ifq.maxlen=1024
> 
> >>>
> >>> You want net.inet.ip.ifq.maxlen=8192 not 'net.ip.ifq.maxlen=1024'
> >>>
> >>
> >> besides what chris told you maybe you could silence pf logging... your
> >> dmesg is full of pf logs, maybe you have pf debuging enabled?
> >>
> >> please send cat /var/run/dmesg.boot inline just to see which version of
> >> openbsd your running and on which hardware ...
> >>
> >> and set your pf states to some big number.. set limit states 10 or
> >> something like that ..
> >>
> >> and of course run at least openbsd 6.1 or if you brave enough run
> >> -current 
> >>
> >> just side note, openbsd on E5-2643 v2 @ 3.50GHz from around February
> >> 2017 had plain forwarding performance of 1.4Mpps and openbsd from today
> >> on same box can forward cca 1.7Mpps ...
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>


-- 
J. Guillermo Narvaez
@_aran0id


Re: vmm workflow

2017-08-17 Thread Mike Larkin
On Wed, Aug 16, 2017 at 07:50:59PM -0700, Carlos Cardenas wrote:
> Howdy.
> 
> I've been playing around with vmm(4) on 6.1 and have noticed a few
> things that seem odd.
> 
> Take the following vm.conf:
> ramdisk="/home/los/vmm/bsd.rd-current"
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> boot $ramdisk
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
> 
> Doing vmd -n yields:
> /etc/vm.conf:6: syntax error
> 
> Removing the boot line yields a warning about unused macro (referring
> to ramdisk).
> 
> So now my config is:
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
> 
> vmd(8) is happy and am expecting
> vmctl start "test.vm" -b "/home/los/vmm/bsd.rd-current" -c
> to work since all the other params have been defined in vm.conf.
> 
> Instead I get:
> vmctl: starting without disks
> vmctl: starting without network interfaces
> vmctl: start vm command failed: Operation not permitted
> 
> Increasing verbose log on vmd gets me:
> startup
> /etc/vm.conf:4: switch "local" registered
> /etc/vm.conf:11: vm "test.vm" registered (disabled)
> vm_priv_brconfig: interface bridge0 description switch1-local
> vm_priv_brconfig: interface bridge0 add vether0
> vmd_configure: not creating vm test.vm (disabled)
> denied request 3 from uid 1000
> 
> However, if I perform a "doas vmctl start" first (along with
> install) and then define it in vm.conf, "vmctl start 'test.vm'" works as
> expected.
> 
> What is the expected workflow for vmm?
> 
> Any ideas on why the boot $ramdisk line is error'ing out?
> 
> +--+
> Carlos
> 

You can't yet specify part of the parameter list in vm.conf and override or
supplement that later with command line arguments to vmctl. So the thing that
is breaking you is the -b option on your command line.

I don't know why the macro expansion is failing.

Note that the ability to supplement config options is something we planned to
do at some point, just haven't got there yet. There are questions to be
answered about how that interacts with the "owner" concept. For now, either
specify all the VM config on the command line, or all of it in vm.conf. Don't
mix and match.

-ml



Re: OpenBSD-based ISP

2017-08-17 Thread Hrvoje Popovski
On 17.8.2017. 21:23, Juan Guillermo Narvaez wrote:
> This is the dmesg.boot.

nice box with nice cpu and interfaces ... :)

if you can, disable Hyper Threading ..

> In pf.conf:
> set debug notice

default is error

when you do all that what people have told you, i would be interested if
you see some performance improvement?



> On Thu, Aug 17, 2017 at 3:46 PM, Hrvoje Popovski  wrote:
> 
>> On 17.8.2017. 17:13, Chris Cappuccio wrote:
>>> Juan Guillermo Narvaez [guille...@nrvz.net] wrote:
 # sysctl | grep ifq
 net.inet.ip.ifq.len=0
 net.inet.ip.ifq.maxlen=1024
 net.inet.ip.ifq.drops=46068291
 net.inet6.ip6.ifq.len=0
 net.inet6.ip6.ifq.maxlen=256
 net.inet6.ip6.ifq.drops=0

>>>
>>> The drops are high. You probably want a higher maxlen. I use 8192 on busy
>>> forwarding boxes.
>>>
 # cat sysctl.conf
 net.inet.ip.forwarding=1
 kern.bufcachepercent=90
 net.ip.ifq.maxlen=1024

>>>
>>> You want net.inet.ip.ifq.maxlen=8192 not 'net.ip.ifq.maxlen=1024'
>>>
>>
>> besides what chris told you maybe you could silence pf logging... your
>> dmesg is full of pf logs, maybe you have pf debuging enabled?
>>
>> please send cat /var/run/dmesg.boot inline just to see which version of
>> openbsd your running and on which hardware ...
>>
>> and set your pf states to some big number.. set limit states 10 or
>> something like that ..
>>
>> and of course run at least openbsd 6.1 or if you brave enough run
>> -current 
>>
>> just side note, openbsd on E5-2643 v2 @ 3.50GHz from around February
>> 2017 had plain forwarding performance of 1.4Mpps and openbsd from today
>> on same box can forward cca 1.7Mpps ...
>>
>>
>>
>>
>>
>>
> 
> 



Re: OpenBSD-based ISP

2017-08-17 Thread Juan Guillermo Narvaez
This is the dmesg.boot.

In pf.conf:
set debug notice

On Thu, Aug 17, 2017 at 3:46 PM, Hrvoje Popovski  wrote:

> On 17.8.2017. 17:13, Chris Cappuccio wrote:
> > Juan Guillermo Narvaez [guille...@nrvz.net] wrote:
> >> # sysctl | grep ifq
> >> net.inet.ip.ifq.len=0
> >> net.inet.ip.ifq.maxlen=1024
> >> net.inet.ip.ifq.drops=46068291
> >> net.inet6.ip6.ifq.len=0
> >> net.inet6.ip6.ifq.maxlen=256
> >> net.inet6.ip6.ifq.drops=0
> >>
> >
> > The drops are high. You probably want a higher maxlen. I use 8192 on busy
> > forwarding boxes.
> >
> >> # cat sysctl.conf
> >> net.inet.ip.forwarding=1
> >> kern.bufcachepercent=90
> >> net.ip.ifq.maxlen=1024
> >>
> >
> > You want net.inet.ip.ifq.maxlen=8192 not 'net.ip.ifq.maxlen=1024'
> >
>
> besides what chris told you maybe you could silence pf logging... your
> dmesg is full of pf logs, maybe you have pf debuging enabled?
>
> please send cat /var/run/dmesg.boot inline just to see which version of
> openbsd your running and on which hardware ...
>
> and set your pf states to some big number.. set limit states 10 or
> something like that ..
>
> and of course run at least openbsd 6.1 or if you brave enough run
> -current 
>
> just side note, openbsd on E5-2643 v2 @ 3.50GHz from around February
> 2017 had plain forwarding performance of 1.4Mpps and openbsd from today
> on same box can forward cca 1.7Mpps ...
>
>
>
>
>
>


-- 
J. Guillermo Narvaez
@_aran0id


dmesgb.tar.bz2
Description: BZip2 compressed data


Re: Using USB headsets

2017-08-17 Thread Maurice McCarthy
On 16/08/17 19:21, Norman Golisz wrote:
> Hi,
> 
> I'm trying to figure out how to get my USB headset (Plantronics C310)
> to work.
> 
> I can't hear anything, nor does the microphone work. I fiddled with
> different mixerctl settings to no avail, and I'm not even sure my
> headset had been detected at all, as the available options to set
> don't change, while I plug or unplug the device[1].
> 
> dmesg[2] happily reports it detected and configured the device:
> 
> uaudio0 at uhub0 port 1 configuration 1 interface 0 "Plantronics Plantronics 
> C310" rev 2.00/1.35 addr 2
> uaudio0: audio rev 1.00, 7 mixer controls
> audio1 at uaudio0
> uhidev1 at uhub0 port 1 configuration 1 interface 3 "Plantronics Plantronics 
> C310" rev 2.00/1.35 addr 2
> uhidev1: iclass 3/0, 42 report ids
> uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0

...

> 
> Do you have an idea what else to try? Do you have experience with
> similar hardware?
> 
> Best wishes,
> Norman
> 

# usbdevs -vd 

as root will tell you something. I'd also look at lsusb as an ordinary
user. You might have to add the user to the operator group or change 
permissions in /dev/usbx (whichever number it is) for the user to have
access to the usb. But I'm guessing. 

Lastly raise outputs.master=255,255

> [1] mixerctl -v
> 

> outputs.master=126,126
> outputs.master.mute=off  [ off on ]

Good Luck
Moss



Re: OpenBSD-based ISP

2017-08-17 Thread Hrvoje Popovski
On 17.8.2017. 17:13, Chris Cappuccio wrote:
> Juan Guillermo Narvaez [guille...@nrvz.net] wrote:
>> # sysctl | grep ifq
>> net.inet.ip.ifq.len=0
>> net.inet.ip.ifq.maxlen=1024
>> net.inet.ip.ifq.drops=46068291
>> net.inet6.ip6.ifq.len=0
>> net.inet6.ip6.ifq.maxlen=256
>> net.inet6.ip6.ifq.drops=0
>>
> 
> The drops are high. You probably want a higher maxlen. I use 8192 on busy 
> forwarding boxes.
> 
>> # cat sysctl.conf
>> net.inet.ip.forwarding=1
>> kern.bufcachepercent=90
>> net.ip.ifq.maxlen=1024
>>
> 
> You want net.inet.ip.ifq.maxlen=8192 not 'net.ip.ifq.maxlen=1024'
> 

besides what chris told you maybe you could silence pf logging... your
dmesg is full of pf logs, maybe you have pf debuging enabled?

please send cat /var/run/dmesg.boot inline just to see which version of
openbsd your running and on which hardware ...

and set your pf states to some big number.. set limit states 10 or
something like that ..

and of course run at least openbsd 6.1 or if you brave enough run
-current 

just side note, openbsd on E5-2643 v2 @ 3.50GHz from around February
2017 had plain forwarding performance of 1.4Mpps and openbsd from today
on same box can forward cca 1.7Mpps ...







Re: vmm workflow

2017-08-17 Thread Bryan Harris
I had the same issue with boot option in vm.conf and never solved my
difficulty using the vm.conf file itself (I assumed I must have
misunderstood the doc).  Instead I used the command line option for vmctl
starting the machine.  After I installed the O/S using bsd.rd I did not
need that option anymore.

My vm.conf looks like this.

switch "my_switch" {
  # interface bridge0
  add vether0
}

vm "vm1" {
  memory 512M
  disk /home/VM/disk.img
  owner user:group
  interface tap {
switch "my_switch"
  }
  disable
}

And the commands which seem to work (as root) are like so.

vmctl create /home/VM/disk2.img -s 10G
vmctl start vm2 -c -b /home/user/bsd.rd -m 512m -n my_switch -d
/home/VM/disk2.img

V/r,
Bryan


On Wed, Aug 16, 2017 at 10:50 PM, Carlos Cardenas 
wrote:

> Howdy.
>
> I've been playing around with vmm(4) on 6.1 and have noticed a few
> things that seem odd.
>
> Take the following vm.conf:
> ramdisk="/home/los/vmm/bsd.rd-current"
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> boot $ramdisk
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
>
> Doing vmd -n yields:
> /etc/vm.conf:6: syntax error
>
> Removing the boot line yields a warning about unused macro (referring
> to ramdisk).
>
> So now my config is:
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
>
> vmd(8) is happy and am expecting
> vmctl start "test.vm" -b "/home/los/vmm/bsd.rd-current" -c
> to work since all the other params have been defined in vm.conf.
>
> Instead I get:
> vmctl: starting without disks
> vmctl: starting without network interfaces
> vmctl: start vm command failed: Operation not permitted
>
> Increasing verbose log on vmd gets me:
> startup
> /etc/vm.conf:4: switch "local" registered
> /etc/vm.conf:11: vm "test.vm" registered (disabled)
> vm_priv_brconfig: interface bridge0 description switch1-local
> vm_priv_brconfig: interface bridge0 add vether0
> vmd_configure: not creating vm test.vm (disabled)
> denied request 3 from uid 1000
>
> However, if I perform a "doas vmctl start" first (along with
> install) and then define it in vm.conf, "vmctl start 'test.vm'" works as
> expected.
>
> What is the expected workflow for vmm?
>
> Any ideas on why the boot $ramdisk line is error'ing out?
>
> +--+
> Carlos
>
>


Re: OpenBSD-based ISP

2017-08-17 Thread Chris Cappuccio
Juan Guillermo Narvaez [guille...@nrvz.net] wrote:
> # sysctl | grep ifq
> net.inet.ip.ifq.len=0
> net.inet.ip.ifq.maxlen=1024
> net.inet.ip.ifq.drops=46068291
> net.inet6.ip6.ifq.len=0
> net.inet6.ip6.ifq.maxlen=256
> net.inet6.ip6.ifq.drops=0
> 

The drops are high. You probably want a higher maxlen. I use 8192 on busy 
forwarding boxes.

> # cat sysctl.conf
> net.inet.ip.forwarding=1
> kern.bufcachepercent=90
> net.ip.ifq.maxlen=1024
> 

You want net.inet.ip.ifq.maxlen=8192 not 'net.ip.ifq.maxlen=1024'




Re: OpenBSD-based ISP

2017-08-17 Thread Juan Guillermo Narvaez
# sysctl | grep ifq
net.inet.ip.ifq.len=0
net.inet.ip.ifq.maxlen=1024
net.inet.ip.ifq.drops=46068291
net.inet6.ip6.ifq.len=0
net.inet6.ip6.ifq.maxlen=256
net.inet6.ip6.ifq.drops=0

# cat sysctl.conf
net.inet.ip.forwarding=1
kern.bufcachepercent=90
net.ip.ifq.maxlen=1024



On Wed, Aug 16, 2017 at 5:06 PM, Hrvoje Popovski  wrote:

> On 16.8.2017. 19:55, Juan Guillermo Narvaez wrote:
> > Hello everyone!
> >
> > I'm relative new using OpenBSD, I have just 4 years using this OS for
> dhcp
> > servers.
> > Today I have the mission of implement this OS in a cablemodem headend, in
> > my first try I get negative results with this rules:
> >
> > *pass all flags S/SA*
> >
> > *#LAN*
> > *match out log on bge0 inet from 192.168.254.0/24 <
> http://192.168.254.0/24>
> > to any nat-to 200.91.35.55*
> > *pass on bge0 inet from 192.168.254.0/24  to
> any
> > flags S/SA*
> > *#CPE Network*
> > *match out on bge0 inet from 172.21.0.0/19  to any
> > nat-to 200.91.35.55*
> > *pass on bge0 inet from 172.21.0.0/19  to any
> flags
> > S/SA*
> >
> > This is a basic PF that I use for this try, the CPE network has 900
> active
> > customers.
> > When I put the whole customer network traffic through my OpenBSD router
> the
> > traffic tend to fall slowly and the LAN network is really slow too. I
> read
> > about a lot of 'tweaks' the high performance configurations but I think
> > that OpenBSD can handle 400mbps without tweaking.
> >
> > I'm wrong?
> > What am I doing bad?
> >
> > Thank you!
> >
> >
> >
> >
>
> could you send dmesg, cat /etc/sysctl.conf and sysctl | grep ifq
>
> i'm having 2 old Dell R610 with 2 x E5630 cpu and bcm5709 nic's in very
> standard pf,carp,pfsync,pflow setup and on top of that i'm logging
> everything. boxes are doing cca 100k states and having around 2k hosts
> behind them ... of course that i'm running -current :)
>
>


-- 
J. Guillermo Narvaez
@_aran0id


dmesg.tar.xz
Description: application/xz


Re: keyboard layout 6.1 obsd

2017-08-17 Thread Matias Moreno Meringer
I use an US keyboard with dead keys in X. In order to make it work, I have
the following statement in my ~/.xinitrc:

setxkbmap -layout us -variant altgr-intl

Test it with layout br for your case; it should work.


On Thu, Aug 17, 2017 at 11:07 AM, Friedrich Locke  wrote:

> Hi folks,
>
> i have just installed obsd 6.1 amd64. My keyboard is set as "br" in
> /etc/kbdtype and it is working 100% on the console.
>
> But when i start xenodm, it is not working for "br" ! Do you know where i
> should set X to start it working with "br" keyboards.
>
> Thanks in advance.
>


Re: OpenBSD 6.1 on Asus E200HA (SoC Intel z8350)

2017-08-17 Thread Stefan Sperling
On Thu, Aug 17, 2017 at 02:53:09PM +0100, Pedro Ramos wrote:
> Hello,
> I am having troubles making the Asus E200HA (SoC Intel z8350) keyboard work
> correctly on OpenBSD 6.1.
> 
> OpenBSD does detect the keyboard and it works at boot time during
> installation. But as soon it gets to the installer prompt the keyboard does
> not work any more.
> 
> Any idea how to fix this issue? Thanks.
> 
> Best regards,
> Pedro Ramos
> 

This was fixed in -current yesterday.
I would recommend -current on this machine anyway as it contains
relatively new hardware.



keyboard layout 6.1 obsd

2017-08-17 Thread Friedrich Locke
Hi folks,

i have just installed obsd 6.1 amd64. My keyboard is set as "br" in
/etc/kbdtype and it is working 100% on the console.

But when i start xenodm, it is not working for "br" ! Do you know where i
should set X to start it working with "br" keyboards.

Thanks in advance.


OpenBSD 6.1 on Asus E200HA (SoC Intel z8350)

2017-08-17 Thread Pedro Ramos

Hello,
I am having troubles making the Asus E200HA (SoC Intel z8350) keyboard 
work correctly on OpenBSD 6.1.


OpenBSD does detect the keyboard and it works at boot time during 
installation. But as soon it gets to the installer prompt the keyboard 
does not work any more.


Any idea how to fix this issue? Thanks.

Best regards,
Pedro Ramos



Full disk encryption questions

2017-08-17 Thread Philippe Meunier
Hello,

I've been testing full disk encryption using the softraid crypto
discipline on an old Thinkpad T61, using OpenBSD amd64 6.1-release (dmesg
below).  I just followed the FAQ: creating a wd0a RAID partition, then an
encrypted sd1 using bioctl (sd0 was the USB thumb drive I booted from),
then installed OpenBSD as usual, rebooted from the disk (sd0 was then the
encrypted partition), and everything worked great.  Very neat.

Then, out of curiosity, I did the following while the system was running:

# bioctl -d sd0

Somehow I expected a "device busy" error message and no consequences, just
like when one tries to unmount a busy file system, but instead the kernel
immediately panicked ("init died").  Well, that was a bit harsh but I guess
I only got what I asked for.

Anyway, the interesting part happened when I rebooted the machine.  Instead
of asking me for my passphrase as before, I got the following (copied by
hand):

Using drive 0, partition 0.
Loading ..
probing: pc0 mem[630K 997M a20=on]
disk: hd0+ sr0
>> OpenBSD amd64 BOOT 3.33
open(hd0a:/etc/boot.conf): Invalid argument
boot>
cannot open hd0a:/etc/random.seed: Invalid argument
booting hd0a:/bsd: open hd0a:/bsd: Invalid argument
 failed(22). will try /bsd
boot>
cannot open hd0a:/etc/random.seed: Invalid argument
booting hd0a:/bsd: open hd0a:/bsd: Invalid argument
 failed(22). will try /bsd
Turning timeout off.
boot>

So I booted from the USB thumb drive again and tried to re-attach the
softraid device:

# bioctl -c C -l /dev/wd0a softraid0
Passphrase:
sd1 at scsibus4 targ 1 lun 0:  SCSI2 0/direct fixed
sd1: 114473MB, 512 bytes/sector, 234441056 sectors
softraid0: volume sd1 is roaming, it used to be sd0, updating metadata
softraid0: volume sd1 is roaming, it used to be sd0, updating metadata
softraid0: CRYPTO volume attached as sd1
#

I was then able to fsck all the partitions on sd1 and mount them with no
apparent problem.  Re-booting from the computer's disk still failed with
the same "Invalid argument" error messages as above though.

So I guess that detaching the softraid volume while in use somehow trashed
part of the softraid metadata, enough to prevent booting but not enough to
prevent the softraid device from being re-attached.  Just for fun I wiped
the disk clean with dd and tried the whole thing a second time and got the
exact same result again.  Moral of the story: don't detach the softraid
volume while in use (duh).

Still, I have a few questions, just out of curiosity:
- is the panic intended (well, known to the developers and considered
normal; I hesitate to call it a feature) or is it an oversight?
- I would have thought that, once the softraid volume has been created, its
metadata wouldn't need to change (unless the passphrase is changed, or the
volume is roaming, as seen above). Any idea why part of it gets trashed?
- is there a way to get the computer to boot again, short of wiping the
disk with dd and starting from scratch again?

Cheers,

Philippe



OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr  1 13:45:56 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1030422528 (982MB)
avail mem = 994574336 (948MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (73 entries)
bios0: vendor LENOVO version "7LETD0WW (2.30 )" date 02/27/2012
bios0: LENOVO 7659AE6
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT ASF! SSDT SSDT 
SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) 
EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) 
EHC0(S3) EHC1(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz, 2194.88 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz, 1995.01 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EX

Re: OpenBSD-based ISP

2017-08-17 Thread Stuart Henderson
On 2017-08-16, Juan Guillermo Narvaez  wrote:
> *match out on bge0 inet from 172.21.0.0/19  to any
> nat-to 200.91.35.55*

natting a whole /19 to a single address, especially with the default port range
50001-65535, isn't going to work well.

I'd suggest at least using a dedicated IP (not used for services or locally
sourced connections) with "port 1024:65535", if not multiple IPs.

As already mentioned, check your state limit. Also check sysctl net.inet.ip.ifq,
if there are drops you may need to increase the queue size.