another spoof domain

Spoof Domains
step by step..

(apply brakes here)

I was about to create a new spoof virtual domain for my LAN, and it occurred to me.. "I should write down the steps I take, save someone else doing it, save time".

So, here goes..

1: Create the fake host..

Every machine you wish to fool, needs to have host entry for your spoofy domain. Let's call this spoof domain "arc". The host file entry would simply be..

  192.168.1.100  arc

See here for details of how to add hosts to your particular machine.

I have one central hosts file that I import into all the different machines. I find this easier to maintain. A local DNS server is another option (or, as suggested by Druid; add the entry to your local nameserver's hosts file, if you have one).

Typing arc into any local browser will now point the it to the Apache server, which will completely ignore the request, until we..

2: Create a virtual host in apache config..

I keep mine in a vhosts.conf file, right next to the httpd.conf (I use an include statement to pull the directives in). The "arc" entry goes something like this..

	<VirtualHost *>
	  ServerName  arc
	  ServerAlias  arc.com arc.org
	  ServerAdmin  corz@corzoogle.com
	  DocumentRoot  "W:/tech/dev"
	  DirectoryIndex  index.html index.php
	  ServerSignature  Email
	</VirtualHost>
Note the aliases, (handy for testing rewrite rules and such). You can add as many aliases as you like, so long as you also create corresponding host entries for each (step 1). Also note, this entry is for a Windows® Apache server; I figured it was about time to do a Windows-orientated article. Really, only the DocumentRoot directive is different.

3: Restart apache..

Sadly I don't have the "corzweescriptpack" for windows, although I do have a righteous /unix subtree on my windows box! Aye, I mean emacs, tcsh, ls, tar, the works! That's right! I do ls to get directory listings on my peecee! Oh Joy of UNIX!

However, Apache for windows comes with a whole host of useful shortcuts, so restarting's a breeze; apache also installs as a system service, handy. On UNIX/Linux, your usual apachectl command will be fine. On Mac OS X, use corzweescriptpack! .. ra

We're done!

This is what we get typing arc into a web browser now..

fancy index of arc spoof domain

En-joy!

;o) corz.org

Welcome to the comments facility!


previous comments (two pages)   show all comments

ed - 21.06.05 11:16 am

Hello,
I have a WinXP SP2 machine running Apache 2.0.53. I named it xyro instead of arc. I performed those tasks but it says "connection refused".

Please mail be back with the solution.

Thanks in advance.


vinny - 04.07.05 12:17 pm

when i try to connect to a server on battlefield 2 i am disconnected from the internet.i have tried to open ports, turned firewall off, turned off intrution detection, even formatted. the first time i installed the game i connected fine. then again after i formatted. it works once then thats it. i cant connect again. any idea's? medal of honor and call of duty work fine online. its just battlefield 2 i'm having problems with. the game on single player runs fine also.


corz - 04.07.05 4:48 pm

well with a working in-house mail server, I won't be missing any more comments, but I sure won't be mailing responses either!

ed, that simply means there's no server running, or else a firewall between you is preventing access.

vinny, maybe you should take a look here.

;o)


Ja - 11.07.05 10:19 pm

Hello cor...

I love all the stuff you've done, the second I get home I am downloading you IM thing, I'll probly use your editor on my CMS I am working on.

but anyway:

I work on a Windoze XP machine (sorry :(). I also have a linux machine setting right next for it, for testing purpouses, before I upload it to a live machine.

I hate having to type 90.10.10.35/jabirdcms everytime I wanna go there, so do I do this all on the linux server, or do I need to install apache on the windoze machine to spoof 90.10.10.35 to something like test?


corz - 12.07.05 1:48 am

Hi Ja. My desktop sounds similar to yours. I too am currently doing the bulk of my workl on an XP box, with a linux server sitting right next to it. Windows XP isn't so bad, so long as you don't go connecting it directly to the internet! Your router is your firewalling friend!

You don't need to install Apache on the XP box (although it's handy to do exactly this, especially if you develop php applications, because many others serve on windows, and you can check your script's cross-platform compatability) all you need to do to the XP box is add a fake host entry to its hosts/lmhosts file (or both). Basically you are fooling it into pointing all requests to that domain ('test') to a LAN address (90.10.10.35)..
    90.10.10.35     test
On the linux server you just need one vhosts entry for your 'test' domain.
<VirtualHost *>
ServerName test
ServerAlias tt t
ServerAdmin me@somewhere.com
DocumentRoot "/home/www/test"
DirectoryIndex index.html index.php
</VirtualHost>
and that's it! Gracefully restart Apache and away you go!

note: if you have URL's in your code that point to the domain "name", i.e..

<?php
include('http://'.$_SERVER['HTTP_HOST'].'/engine?download=menu&clean=true');
?>


you will also want to add an entry to the hosts file on the Linux box, so it correctly points back to itself for these requests, but you'd likely want to do this anyway; It's usually best to keep the hosts files on all your LAN machines fairly well synced.

Yeah, typing "test" instead of 90.10.10.35/jabirdcms is the smart way to go. after a while you'll wonder how you put up with it for so long!

Have fun!

;o)

ps.. note, the+wire, while fun and very functional, has a few interesting bugs, can be sticky on windows, and really was meant more as a concept demo than anything else (play with it, there's much to discover, particularly if you are a developer). I'm looking into doing a pure C version in the future, or "something other than realbasic" anyhow! It does work though (the OS X version is the best, as it was developed on OS X), and I've had a fair few trans-atlantic slideshows myself!


Ja - 12.07.05 2:50 am

For some reason the parser isn't liking what I typed, and I don't really wanna go back and read through it all, so can I perhaps email you, or chat on your program? (I want to test it out smiley for :D)


corz - 12.07.05 3:19 am

Use pre tags for code.

I'm hanging in #corz on blitzed.org IRC (as usual), and I'll be up for a while yet if you want to dive in. There's also a site chat here at corz.org (if you can find the well-hidden link in the toolbar) but it's usually a bit Spanish in there, and really is just for emergencies. It is cool, though, the result of a mad saturday morning coding session. (but anyways, I'm notlogged in there!)

;o)


Ja - 12.07.05 3:53 am

your tags don't balance!

Is what I'm getting


corz - 12.07.05 12:49 pm

so put it inside pre tags!!!
you can use any formatting inside pre tags. try it!

;o)


Ja - 12.07.05 2:24 pm

I did try it... still got the same error... and I'm at work now and I saved what i wanted to type at home lol...

Ah well, it must not have been to very important, but when I get home I'll skim through what I tried to post and try to fix it.


Ja - 12.07.05 2:32 pm

Alright, it works smiley for :D I found the hosts and lmhosts file and added that simple line to it, and now I type http://jabirdcms/ instead of a big 'ol IP...

Thanks alot, might I ask how you figured all this out?


next comments (2 pages)

First, confirm that you are human by entering the code you see..

(if you find the code difficult to decipher, click it for a new one!)


gd verification image

 

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!