DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd November 2016
philo_neo71 philo_neo71 is offline
Package Pilot
 
Join Date: Jul 2009
Posts: 181
Default qemu for 2003 and network options

Hi,
I've installed OpenBSD 6.0 on intel's quad cores, i virtualize with qemu windows 2003 server,
but for the network i've issue :
1/ i reading this link http://cromwell-intl.com/linux/openb...ows-howto.html
2/ i have created 3 files :
2A qemu2-ifup.sh
Code:
#!/bin/sh

# stop DHCP, bounce eth1
/etc/init.d/dhcpd stop
ifdown re0
ifconfig re0 192.168.0.10 romisc up

# bring up tap device tap1
openvpn --mktun --dev tap1 --user root
ifconfig tap1 192.168.0.10 romisc up

# create bridge eth1 - tap1
brctl addbr br0
brctl addif br0 re0
brctl addif br0 tap1

# turn off spanning tree
brctl stp br0 off

# bring up br0 / eth1
# ifconfig eth1 10.1.1.100/24
ifconfig br0 192.168.0.200/24
/etc/init.d/dhcpd start

# forward from the bridge through masquerading to the outside.
# previous FORWARD chain and related rules were set at boot time thusly:
#    iptables -P FORWARD DROP
#    iptables -t nat -F
#    iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source ${EXT_IPADDR}
#    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
#    iptables -A FORWARD -i eth1 -j ACCEPT
#    iptables -A FORWARD -i eth2 -j ACCEPT
# and so on for other internal interfaces.  since br0 just appeared
# as a new internal interface, add the corresponding rule:
iptables -A FORWARD -i br0 -j ACCEPT

and /home/phipo/qemu2-ifdown.sh:
2B qemu2-ifdown.sh
Code:
#!/bin/sh

# shut down the bridge and tunnel
brctl delif br0 tap1
brctl delif br0 eth1
ifconfig br0 down
brctl delbr br0
openvpn --rmtun --dev tap1
# bring eth1 back up
ifconfig eth1 192.168.0.200/24
/etc/init.d/dhcpd stop
/etc/init.d/dhcpd start
2C fire.sh
Code:
#!/bin/sh

cd /home/phipo/
sudo /home/phipo/qemu2-ifup.sh
xterm -e qemu-system-i386 -m 512 -monitor stdio /home/phipo/vm/2k3c.img
sudo /home/phipo/qemu2-ifdown.sh

3/ on windows output i've ip adress 10.x.y.z, i don't anderstand where it found this adressing, because i've put ip adress 192.x.y.z ?

4/ the output of OpenBSD have errors :
Code:
# ./fire.sh 
/home/phipo/qemu2-ifup.sh[4]: /etc/init.d/dhcpd: not found
/home/phipo/qemu2-ifup.sh[5]: ifdown: not found
ifconfig: romisc: bad value
/home/phipo/qemu2-ifup.sh[9]: openvpn: not found
ifconfig: romisc: bad value
/home/phipo/qemu2-ifup.sh[13]: brctl: not found
/home/phipo/qemu2-ifup.sh[14]: brctl: not found
/home/phipo/qemu2-ifup.sh[15]: brctl: not found
/home/phipo/qemu2-ifup.sh[18]: brctl: not found
ifconfig: SIOCDIFADDR: Device not configured
/home/phipo/qemu2-ifup.sh[23]: /etc/init.d/dhcpd: not found
/home/phipo/qemu2-ifup.sh[35]: iptables: not found
/home/phipo/qemu2-ifup.sh[37]: and: not found
Warning: Tried to connect to session manager, None of the authentication protocols specified are supported
/home/phipo/qemu2-ifdown.sh[4]: brctl: not found
/home/phipo/qemu2-ifdown.sh[5]: brctl: not found
ifconfig: SIOCGIFFLAGS: Device not configured
/home/phipo/qemu2-ifdown.sh[7]: brctl: not found
/home/phipo/qemu2-ifdown.sh[8]: openvpn: not found
ifconfig: SIOCDIFADDR: Device not configured
/home/phipo/qemu2-ifdown.sh[11]: /etc/init.d/dhcpd: not found
/home/phipo/qemu2-ifdown.sh[12]: /etc/init.d/dhcpd: not found
#
the tap1 ethernet is created
Maybe i forgot an path
== DHCP NOT FOUND but i want a static IP adress

5/ the output with ifconfig
Code:
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        index 3 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
re0: flags=208843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6> mtu 1500
        lladdr xx:xx:xx:xx:xx:xx
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
        status: active
        inet 192.168.0.10 netmask 0xffffff00 broadcast 192.168.0.255
        inet6 xxxxxxxxxxxxxxxxxx prefixlen 64 scopeid 0x1
enc0: flags=0<>
        index 2 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33188
        index 4 priority 0 llprio 3
        groups: pflog
tap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr zz:zz:zz:zz:zz
        index 5 priority 0 llprio 3
        groups: tap
        status: no carrier
#
Some one have ideas

Regards
Philippe
Reply With Quote
  #2   (View Single Post)  
Old 2nd November 2016
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 740
Default

It appears that you are trying to run a script designed for Linux under OpenBSD? For example, brctl and iptables are Linux programs, they have no counterpart in OpenBSD and hence cannot be found.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cp, mv, and chown command options jjstorm OpenBSD General 2 23rd March 2016 10:27 PM
RIP m0n0wall 2003-2015 Oko Other BSD and UNIX/UNIX-like 2 17th February 2015 04:09 AM
Network problem with OpenBSD 4.6 under QEMU eherrera OpenBSD General 1 17th May 2012 08:23 PM
How to get port's building options? Sunsawe FreeBSD Ports and Packages 14 9th May 2009 06:35 PM


All times are GMT. The time now is 06:44 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick