LinuxQuestions.org
Review your favorite Linux distribution.
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 04-25-2014, 03:24 AM   #1
foxbunny
LQ Newbie
 
Registered: Apr 2014
Posts: 3

Rep: Reputation: 0
How to use dnsspoof to turn router in to 'whole of Interenet'?


I am trying to turn a router on an offline LAN into 'whole of Internet' such that accessing any domain from a machine on the LAN would hit the webserver on the router.

For this purpose, I decided to make a test using two virtual machines using VirtualBox and an internal network with two Debian boxes (let's call them A and B) hooked to each other. Under normal circumstances, the router would not have an Internet connection.

Box A has two interfaces: eth0 and eth1. eth0 is only used to download packages and such. Box B only has eht0 which is connected to the internal network between the two boxes.

On box A, I set up a DHCP server which provides a nameserver IP address that matches its own. It also has an apache HTTP server running. Finally I started dnsspoof on box A using the following command:

Code:
dnsspoof -i eth1
Using dig, I can see that queries for domains like example.com or google.com all return the IP address of the box A as A record. However, when I try to ping or curl any of those domains, I get a 'could not resolve hostname' error.

Can someone please explain what I am doing wrong?
 
Old 04-28-2014, 06:50 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Try using a fake dns server instead of trying to spoof responses:

http://code.activestate.com/recipes/...ke-dns-server/
 
Old 04-29-2014, 07:34 AM   #3
foxbunny
LQ Newbie
 
Registered: Apr 2014
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, kbp. I'll try that.
 
  


Reply


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
turn Mandriva into a router. Help Me please!!!! katy Linux - Newbie 4 12-19-2012 11:37 PM
Help with dnsspoof lee_can Linux - Newbie 1 02-24-2012 12:29 PM
Programmatically turn my router off and on again using c++ possible? DoctorZeus Programming 6 02-22-2012 04:26 PM
Turn linux router into wireless router anthonysaulnier Linux - Wireless Networking 3 09-26-2010 01:05 PM
How do i turn an old comp into a router? NovaWo1f Linux - Networking 5 06-04-2004 06:06 PM

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

All times are GMT -5. The time now is 12:20 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