LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-20-2017, 05:15 AM   #1
mythcat
Member
 
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 77
Blog Entries: 1

Rep: Reputation: 15
Question Devil Linux internet network settings with qemu


The issue is to connect to internet the Devil Linux using qemu.
I start with this:
- install qemu
- download Devil Linux iso
- start qemu with Devil Linux
Code:
 qemu-system-x86_64 -boot d -cdrom ~/devil-linux-1.8.0-rc2-x86_64/bootcd.iso -m 512
- I try to use setup from Devil Linux but not working ( test with lynx browser)
Configuration of network
- internet - router (DHCP ipv4) - Fedora distro - qemu virtualization of Devil Linux -
The ifconfig command:
Code:
[mythcat@localhost ~]$ ifconfig 
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet xx  netmask 255.255.255.0  broadcast xx
        inet6 xx::2  prefixlen 128  scopeid 0x0<global>
        inet6 xx  prefixlen 64  scopeid 0x20<link>
        inet6 xx  prefixlen 64  scopeid 0x0<global>
        ether xx  txqueuelen 1000  (Ethernet)
        RX packets 2958765  bytes xx35199670 (x.3 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1283397  bytes 138714907 (132.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 32  bytes 2564 (2.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32  bytes 2564 (2.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.xxx.1  netmask 255.255.255.0  broadcast 192.168.xxx.255
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
If you know how to solve this issue just post it.
Any help with Devil Linux and hardware , configuration and update - just send me one message.
Any help with Fedora configuration and development - just send me one message.
 
Old 03-20-2017, 09:51 AM   #2
camp0
Member
 
Registered: Dec 2016
Location: Dublin
Distribution: Fedora
Posts: 70

Rep: Reputation: 4
Probably you need to allow from the host machine forward packets. Check iptables and /proc/sys/net/ipv4/ip_forward
 
Old 03-20-2017, 02:50 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
VM's like qemu use one of two (or more) default ways to connect. Common are bridged and nat. I haven't use qemu on a system with predictive nameing of nics but I think your example from from host??
http://wiki.qemu-project.org/Documentation/Networking is a sort of good example. From your start command line there is no mention of using any sort of networking so I'd think the default would be that you should be using a virtual router in the vm. The subnet is shown in drawing in link.
 
Old 03-21-2017, 03:10 AM   #4
mythcat
Member
 
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 77

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by camp0 View Post
Probably you need to allow from the host machine forward packets. Check iptables and /proc/sys/net/ipv4/ip_forward
is set to 1
( I think this is boolean true)
 
Old 03-21-2017, 03:15 AM   #5
mythcat
Member
 
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 77

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by jefro View Post
VM's like qemu use one of two (or more) default ways to connect. Common are bridged and nat. I haven't use qemu on a system with predictive nameing of nics but I think your example from from host??
http://wiki.qemu-project.org/Documentation/Networking is a sort of good example. From your start command line there is no mention of using any sort of networking so I'd think the default would be that you should be using a virtual router in the vm. The subnet is shown in drawing in link.
Yes I think is need to add the net args , please refer to my example.

(I try also some args but the main reason is: what is wrong? the qemu args or setting of this Devil Linux
I'm not very good with english and I don't build the Enterprise station with all features:smb ...)
 
Old 03-21-2017, 02:46 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
There are many web pages on how to set up qemu. If you tell me which one you are using then I could look at it to see if that is right.

There are three parts to this question.

Host, VM and client. Each one has settings to allow connection. Every version of qemu is slightly different so you'd have to use the documentation for that version. I'd assume it should use NAT by default as I pointed out in link.

I don't use Devil linux so I really can't guess that. OK, looked it up. It's a one of a kind distro so not sure what way to go.

I'd think that you should consider making two nics in the command line at least. Normally in a firewall distro you use two nic's. One for wan and one for lan. So in this case you could look up other firewalls meant to run in a VM to protect home systems.


Might be worth it to use an easier gui front end or use VirtualBox instead of qemu.
 
Old 03-21-2017, 02:59 PM   #7
end
Member
 
Registered: Aug 2016
Posts: 266

Rep: Reputation: Disabled
re

qemu-system-x86_64 -boot d -cdrom ~/devil-linux-1.8.0-rc2-x86_64/bootcd.iso -m 512 -net bridge,br=virbr0 -net nic,model=virtio
 
1 members found this post helpful.
Old 03-22-2017, 08:49 AM   #8
mythcat
Member
 
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 77

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by end View Post
qemu-system-x86_64 -boot d -cdrom ~/devil-linux-1.8.0-rc2-x86_64/bootcd.iso -m 512 -net bridge,br=virbr0 -net nic,model=virtio
I understand your args , but the problem is not solve by Devil Linux and briged connection:
- this linux come with setup tool interface (cmd : setup);
- the ping to 127.0.0.1 working well, not for another ip - Network is unreachable;
- I try settings for NIC and network is not working with setup tool:
* the autodetect module not work /lib/modules/4.8.15 with modprobe autoselect;
* the DHCP is set to yes ( save-config -s to save it);
* want to set manually the network interface (over DHCP into setup tool);

module network and config ip's over network.

(maybe the old FreeBSD / BSD linux tutorials can help me)
 
Old 03-22-2017, 08:53 AM   #9
mythcat
Member
 
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 77

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Quote:
Originally Posted by jefro View Post
I don't use Devil linux so I really can't guess that.
Out of subject , I read all your post. Thank you.
 
Old 03-22-2017, 10:57 AM   #10
end
Member
 
Registered: Aug 2016
Posts: 266

Rep: Reputation: Disabled
re

hy

i also could get it done until someone give me command i posted. way dont try with libvirt virt-manager it will defenitly work, you can still use qemu emulator.

virsh --connect qemu:///system start isoname

in virtmanager display options change spice to vnc.

vncviewer 127.0.0.1:0

i reed on arch documents that ping whont work when using host based network (default) if you dont setup interface. check this maybe giv you some ideas

https://wiki.archlinux.org/index.php/QEMU

https://wiki.archlinux.org/index.php/Libvirt

i use this to start vm

qemu-system-x86_64 -display none -vnc :1 -m 2G -smp 4 -enable-kvm
-drive file=~/vm/kali.img -net bridge,br=virbr0 -net nic,model=virtio

vncviewer :1

Last edited by end; 03-22-2017 at 11:20 AM.
 
  


Reply

Tags
linux, qemu vs virtualbox


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why i cannot be able to use internet? What's wrong with my network settings? fshah Linux - Networking 10 12-10-2016 03:44 AM
Devil Linux - config network and usb mouse with virtualbox. mythcat Linux - Newbie 5 11-01-2016 08:41 PM
[SOLVED] PC connected to Devil Linux router has no internet connection. Earlydayrambler Linux - Newbie 7 06-26-2016 06:27 PM
qemu-kvm howto setup virtual network to access Internet garydale Linux - Virtualization and Cloud 5 03-06-2010 12:16 PM
SuSE 6.3 - correct network/internet settings. david3578atl Linux - Distributions 2 05-19-2004 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration