LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-28-2019, 07:47 PM   #16
randdeveloper
Member
 
Registered: Jun 2013
Distribution: linux mint xfce
Posts: 42

Original Poster
Rep: Reputation: Disabled

Thanks very much for your help. Actually the fact that dhcp and dns were both able to be on your network with a machine running Centos was able to help me. I reset the router to it's default configuration then renamed the wireless network and disabled the router's DHCP then reset the VM to provide both DHCP and DNS through the VM and I can connect with my Linux Mint Laptop and get an ip address plus get dns services with nslookup. Thank you.

I still have one problem, however, that when I type an address in the address bar of a browser I get an "unable to connect error" as in Firefox on Linux. This occurs in both the VM and the laptop client.

If my DNS is reporting all addresses to 192.168.0.10 and typing that ip into the address bar gets me to the VM's web page, why doesn't a name get resolved for the browser? Do I have to set something in my Apache configuration?
 
Old 05-28-2019, 08:14 PM   #17
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Your getting there...

You shouldn't have to change Apache just yet. I assume you added an address line similar to what was previously posted. Did you try its full FQDN as the URL? http://mysite.whatever?

Quote:
# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
local=/localnet/
domain=localnet
Just for reference, I added my server's IP address/hostname in the /etc/hosts file and from the above dnsmasq directive automatically adds the .localnet so a URL of http://my_server.localnet or my_server.localnet as the URL worked for me.
 
Old 05-28-2019, 09:19 PM   #18
randdeveloper
Member
 
Registered: Jun 2013
Distribution: linux mint xfce
Posts: 42

Original Poster
Rep: Reputation: Disabled
Thanks for the quick reply. I'm not quite sure what that means. I've called my server FloridaAACE.conf and have entries in /etc/hosts
192.168.0.10 mylocalweb
192.168.0.10 mylocalweb.local

In /etc/dnsmasq.conf I have entries
local=/local/
domain=mylocalweb.local

This doesn't seem to work. If I do hostname -d I get a blank line but hostname -f gives me mylocalweb and hostname -A gives me mylocalweb.local.

However, I can type http://mylocalweb or http://mylocalweb.local in the address and get my web page. It's not case sensitive, and typing mylocalweb without the http:// tries to bring me to google search page.

Last edited by randdeveloper; 05-31-2019 at 09:22 PM. Reason: added expand-hosts directive in dnsmasq.conf
 
Old 05-28-2019, 09:38 PM   #19
randdeveloper
Member
 
Registered: Jun 2013
Distribution: linux mint xfce
Posts: 42

Original Poster
Rep: Reputation: Disabled
I just founds this reference
https://stackoverflow.com/questions/...e-same-address
which covers much of what is included here. Apparently I need to do something else to direct all traffic to my web page. Not sure what that is, however.
 
Old 05-31-2019, 09:45 PM   #20
randdeveloper
Member
 
Registered: Jun 2013
Distribution: linux mint xfce
Posts: 42

Original Poster
Rep: Reputation: Disabled
I'll put instructions here for anyone who's interested as I think the system works.

Problem: using a typical home wireless router hardwired to a computer running an instance of Ubuntu server in a virtual machine to allow users to log onto the wifi and access the website that runs in the VM.

Solution steps:

1. dnsmasq: used for dns and dhcp
dns: set to address=/#/1.2.3.4 This matches any address to that ip. Also set local and domain names to the VMs hostname. Set the ethernet interface that dns will use by "interface=enp0s3"
dhcp: set the dhcp range on the same network as the VM. The VM ip address is set as static. Also set "dhcp-option=6,1.2.3.4"
hosts file: set an entry for the VM hostname pointing to its static ip address.

2. apache: follow instructions in https://unix.stackexchange.com/quest...l-using-apache. I also included the code from https://serverfault.com/questions/40...-a-single-page and modified 000-default.conf to convert any request to a single webpage.

I'll mark this as closed. I greatly appreciate everyone's help.
 
Old 05-31-2019, 09:50 PM   #21
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Good and thanks for posting back with your final solution. This is what LQ is all about...
 
  


Reply

Tags
dnsmasq, portal, server



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
How to : Open Virtual Machine Manager to create a new virtual machine BKChicago Linux - Newbie 2 11-08-2016 09:48 PM
Looking For A Bootable OS + Virtual Machine Combo - Bootable Virtual Machine OS Help angelbabycry Linux - Newbie 7 05-08-2015 08:36 PM
Iptables: route web traffic of virtual machine through local proxy of host machine lola.hipf Linux - Networking 1 10-26-2014 07:09 PM
Is base memory of virtual machine used when virtual machine is not running? ravisingh1 Linux - Virtualization and Cloud 3 04-09-2013 03:41 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM

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

All times are GMT -5. The time now is 08:44 PM.

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