Re: openbsd in virtualization

2009-03-18 Thread Linus Swälas

On Wed, 18 Mar 2009 14:45:44 +0100, Laurens Vets  wrote:


Laurens Vets wrote:

Alexandre Verriere wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Laurens Vets a icrit :

My boss ask how to move current obsd server to virtualiaztion ( such
as  openvz, vmare , etc ) .
anyone in here sucsess moving obsd to Environment  virtualization (
openvz , vmware  etc ) , may be want share to me ?
So obsd become guest OS  ?

ps: i'm so sory to ask this because Efficiency  and reduce IT cost .
thank's


Works great for me under VMware.

/  L
How are you shutting down the OpenBSD guest when you stop VMware?  
Manually?





This can be achieved with FreeBSD compt turned on this way:

halt the obsd guest then set his type to freebsd and back up install  
the

vmware tools:

mount /dev/cd0c /mnt
tar -xzf /mnt/vmware-freebsd-tools.tar.gz -C /tmp
mkdir -p /emul/freebsd/sbin
install -m 555 -o root -g wheel
/tmp/vmware-tools-distrib/lib/sbin32/vmware-guestd /emul/freebsd/sbin
cp -r /tmp/vmware-tools-distrib/etc /etc/vmware-tools

then tune your sysctl.conf
 kern.emul.freebsd=1

Add this one to your rc.local:

if [ -x /emul/freebsd/sbin/vmware-guestd ]; then
echo -n ' vmware-tools'
/emul/freebsd/sbin/vmware-guestd --background
/var/run/vmware-guestd.pid --halt-command "/sbin/shutdown -p -h now"
 fi

Now you can use vmware scripts to automate power management of your vm.

Hope this helps.
 Doesn't work for me.  Vmware-guestd doesn't want to run and the  
message "Abort trap" is printed...


Btw, this is on OpenBSD 4.4 i386 and VMware Server 2.0


I use VMWare Workstation 6.5.1 which, as far as I know, uses the same
hw-compat as Server 2.0 and it sometimes bring my whole machine down
when running OpenBSD 4.4. The crashes are quite random.
Difficult to determine the problem for me though as I changed hardware,
and thus OS, and changed from Workstation 6.0 to 6.5 and OpenBSD-version
to 4.4 at the same time. =)
Previous versions has worked wonders.
I'm kinda curious on if it would be possible to figure out what the
changes are and write a DoS-sploit for VMware/host-OS from it. =)
Host OS would be a Linux 64-bit on Core2Duo if anyone wondered.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: openbsd in virtualization

2009-03-18 Thread Linus Swälas

On Wed, 18 Mar 2009 11:26:19 +0100, Laurens Vets  wrote:


My boss ask how to move current obsd server to virtualiaztion ( such
as  openvz, vmare , etc ) .
anyone in here sucsess moving obsd to Environment  virtualization (
openvz , vmware  etc ) , may be want share to me ?
So obsd become guest OS  ?

ps: i'm so sory to ask this because Efficiency  and reduce IT cost .
thank's


 Works great for me under VMware.
 /  L


How are you shutting down the OpenBSD guest when you stop VMware?   
Manually?


Yes manually. I usually never shut my workstation down unless it
crashes, in which case the VMware guests will have crashed too
of course.
Otherwise I run the guests until I'm "finished" with them, from a
day to several weeks.



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: openbsd in virtualization

2009-03-18 Thread Linus Swälas

On Wed, 18 Mar 2009 09:13:05 +0100, sonjaya  wrote:


Hi...

My boss ask how to move current obsd server to virtualiaztion ( such
as  openvz, vmare , etc ) .
anyone in here sucsess moving obsd to Environment  virtualization (
openvz , vmware  etc ) , may be want share to me ?
So obsd become guest OS  ?

ps: i'm so sory to ask this because Efficiency  and reduce IT cost .
thank's



Works great for me under VMware.

/  L

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: httpdv6

2007-12-08 Thread Linus Swälas
On Sat, 08 Dec 2007 16:23:55 +0100, Marc Balmer <[EMAIL PROTECTED]>  
wrote:



so either people live with the fact that *:port becomes 0.0.0.0:port
for the IPv4 case and ::port for the IPv6 case



 How about ditching support for * and just support 0.0.0.0:port and
::port?
Anyone who agrees on this?
No way people can mess that up right?




The config change is trivial, small and painless and can be well
documented.



 In case someone else agrees with me, would the change I proposed
also be trivial?





In my opinion we should not use the ambigous '*' at all, in all
daemons.


So, at least someone agrees. ;)


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: httpdv6

2007-12-08 Thread Linus Swälas
On Sat, 08 Dec 2007 15:41:36 +0100, Marc Balmer <[EMAIL PROTECTED]>  
wrote:



the unspecified address is 0.0.0.0 for IPv4 and :: for IPv6.  '*'
is ambigous and it makes no sense to assume '0.0.0.0' and '::' if
a user specifies '*'.  This could lead to security problems if
someone would not be aware that this uses both address families.
I am strongly in favour of a notation that makes it totally clear
wich address family is meant.


I intuitivly feel that * means IPv4 and IPv6, although I agree on
the security problem issue.




so either people live with the fact that *:port becomes 0.0.0.0:port
for the IPv4 case and ::port for the IPv6 case


How about ditching support for * and just support 0.0.0.0:port and
::port?
Anyone who agrees on this?
No way people can mess that up right?



The config change is trivial, small and painless and can be well
documented.


In case someone else agrees with me, would the change I proposed
also be trivial?

Regards

/  Linus


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: Code signing in OpenBSD

2007-12-05 Thread Linus Swälas

On Thu, 06 Dec 2007 02:35:38 +0100, Gilbert Fernandes
<[EMAIL PROTECTED]> wrote:



Signing the hashes could help but you do know very few
people are really going to check those.


Or you pull the MD5s from another source than your packages,
not bloody likely that the two different sites you've selected
for download has both been hacked.
This does not protect against the master site being owned though,
though I guess that'd be noticed and announced.


Easy thing is to use the CDs though, just as people has already
stated. =)



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread Linus Swälas

On Mon, 12 Nov 2007 18:25:57 +0100, William Boshuck
<[EMAIL PROTECTED]> wrote:


On Mon, Nov 12, 2007 at 02:02:32AM +0100, Linus Swdlas wrote:

On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote:



feel free to correct me. =)


This kind of parameter substitution is in the POSIX 1 specification
for sh.  See the parameters section of the man page for sh(1).

I stand corrected. ;)



But I wouldn't, I'd let bash do it:


Probably better to use sh, or ksh, since they
are in OpenBSD by default, and are more than
up to the task.


OpenBSD's ksh is great, I've never bothered to check if it's
available for Solaris for example. I've just assumed that it's
not, and bash is. And I use Linux too, so, I personally prefer
bash. =)
Though in this case I agree with you, at least if he doesn't
already have bash installed. =)


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread Linus Swälas

On Mon, 12 Nov 2007 02:24:37 +0100, Ingo Schwarze <[EMAIL PROTECTED]> wrote:


Your sh-kludge cited above is even worse; please DO try surfing to
  telnet://localhost:1234&xmessage:bad:guys:got:in


And with my kludge it'd work with an url such as:
telnet://host:port&touch /tmp/test

or, if you use ssh or rsh in the script instead: (I don't have telnet)
telnet://host:port touch /tmp/test'

would create /tmp/test on host instead of localhost
as in the first example.

However, I can't get that to misbehave if I do:

exec xterm -e "telnet" "$host $port"
or
exec xterm -e "telnet" "$host" "$port"



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



Re: [OT] making Firefox respect telnet:// URLs

2007-11-11 Thread Linus Swälas

On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote:


xterm -e "telnet `echo ${1##telnet://}|sed -e 's/:/ /'`"

...

My .telnet4firefox.sh file now is:

#!/bin/sh
xterm -e "telnet `echo ${*##telnet://} | sed 's/:/ /g'`"

...

- I understand the backtick quoted execution.
- I *think* the {} bit is awk(1), but I'm not entirely clear how it
does what it does.


The ${var##string} part is ksh or bash specific, see "Parameter Expansion"
in the bash man page if you're using bash.
I see your #! line says /bin/sh but to my knowledge a "real" sh, not
emulated by bash or ksh doesn't support ${##} and friends, if I'm wrong
feel free to correct me. =)
What it does is cut away the string "telnet://" from the beginning of the
first positional parameter.
(You've changed that to * in your last example, don't know what will be
substituted for $* there if you have more than one positional argument
for your script, you might what to test that or change back to ${1} ).



- I think that the $* variable, which I think is somehow what the
${*##telnet://} bit is about, is the entire string of parameters
passed to the script. ($1 as in the previous examples would be the
first parameter only.)

Yes. $@ is also all the positional parameters, they expand differently
when expanded inside "". A full explaination can be found under "Special
Parameters" in the bash man page.


I'm not really happy with the way this is put together. If awk(1) can
remove telnet:// from $* (if present), then surely it should be able
to turn a colon (if present) into a space, right?


If I'd use a pipe, I'd pipe it to tr, not sed.

But I wouldn't, I'd let bash do it:

#!/bin/bash
IFS=:
set -- $1

host=${2##//}
port=$3
xterm -e "telnet $host $port"

This way, you won't need to use anything else than bash itself. =)
What it does is that it splits $1 using : as a delimiter and stores
the split parts into the positional arguments like this:
$1 = "telnet"
$2 = "//example.com"
$3 = "1991"

Then the host=${2##//} cuts away the "//" from $2 and stores in $host.



Yes, this is an opportunity for me to really start looking into
awk(1), but thus far I seem to be making little headway...


Awk is nice, but this isn't awk. ;)


Thanks again and kind regards,
--ropers


Hope it helps!

/  Linus


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/