Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:05:33+00:00 2026-06-14T05:05:33+00:00

Basically my situation is that I’m running a VM for developing web sites. The

  • 0

Basically my situation is that I’m running a VM for developing web sites.

The host machine has its dns pointing at the VM which, is running dnsmasq, which resolves the addresses of various dev sites; i.e. test.mysite.vm, etc.

The issue is, when I go from my work network to my home network, it all breaks because the IP of the VM changes. Is it possible to serve different IP addresses based on which interface the request came from? Or should I be trying to tackle this in a completely different way?

Thanks for your help!


Turns out there was a much easier approach to this after all…

I now set up 2 interfaces on the VM, and don’t need to use dnsmasq.

The first is just a bridged/shared interface which allows the VM to use whatever internet connection is available to the host, with a restart of the network each time I move office.

The 2nd is a private connection to my VM host, which has a static IP address. This is the interface I use to connect and bind any services such as nginx, mysql, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:05:34+00:00Added an answer on June 14, 2026 at 5:05 am

    You can run two instances of dnsmasq, each with a different interface it listens on. You can use the --interface=X and --bind-interfaces options for that. By default, it also binds the loopback device lo and will fail if two processes try to bind it. Use --except-interface=lo to avoid that.

    dnsmasq --interface=eth0 --except-interface=lo --bind-interfaces --dhcp-range=192.168.0.2,192.168.0.10,12h
    dnsmasq --interface=eth1 --except-interface=lo --bind-interfaces --dhcp-range=10.0.0.2,10.0.0.10,12h
    

    Make sure your configuration file is empty when you test this as it always overrides the command line. You can also use --conf-file=/dev/null.

    As I mentioned in the comment, I’m not too sure how this helps your situation, but it might help anyone else who tries to get two different address ranges on two different interfaces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, my situation requires me to check to see if the String that is
I have a situation that users access remote MySQL server in C# application. Basically,
I'm in a situation where I've got a project that has a large number
I have a situation where I need to access an object that has been
This is with ASP.NET Web Forms .NET 2.0 - I have a situation that
The Situation I have a table in a DB that contains job types, basically
This is a very strange situation that I've come across. Basically, I'm trying to
Basically we are in a major hacky situation. We have a few web pages
Current Situation I am in the early phases of designing a web app that
I have a situation that relies on knowing when the job completes. Basically a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.