0

I have a local network consisting of two virtual machines (for testing purposes). Both run Debians. I'll refer to them as A and B. My goal is to have A act as 'whole of Internet' for B (for HTTP requests on ports 80 and 443), such that using any domain name (even those that don't exist on the Itneretnet) return the response from the web server on A.

I've installed a DHCP server on A, and made it use its own IP address as the DNS server address, and started a dnsspoof tool. On B, I can successfully connect to the first one and obtain the IP address as well as the nameserver address using DHCP.

The dnsspoof is started with:

# dnsspoof -i eth1

When I use dig I get the desired IP address in the answer section:

# dig example.com
...
;; ANSWER SECTION:
example.com.     60     IN     A     10.0.0.1

Apart from dig, no other tool (ping, curl, etc) will actually use the address, but instead they all complain that the hostname could not be resolved.

What am I doing wrong and is this approach good?

2
  • If you had been typing ping example.com, try typing ping example.com. (note the ending dot). Does that make a difference?
    – Spiff
    Apr 25, 2014 at 19:43
  • @Spiff: No difference.
    – user128580
    Apr 26, 2014 at 8:41

0

You must log in to answer this question.