Redirecting Net traffic to local host site

Discussion in 'Hardware' started by rezurex, May 21, 2004.

  1. rezurex

    rezurex Private E-2

    Whats up guys. I have been trying to restrict access to a website and have it redirected to a local host... I know there's a way to ban access to specific sites by manually adding the host address and allocating the local host IP to it in XP in etc/hosts. I was wondering if there was a method where i could relocate a host, such as yahoo.com to a localsite address (192.xxx.xxx.xxx) where html files on the localhost computer would be displayed. Hence the user on that PC, whenever accessing that specific site (such as yahoo.com) would not know they were accessing a site on local network (assuming they dont know that 192.xxx.xxx.xxx is a local address)

    i have reasons for needing to do this... mainly because this stupid housemate of mine sometimes uses my PC to access dirty websites. I just want to scare him by putting a bunch of hosts and making some html files that let him know that i know what he's doing... and that he should stop or i'll let the rest of the house know that he is into weird fetishes. any help i can receive would be appreciated... its been annoying the hell out of me recently. thanks in advance :D
     
  2. rezurex

    rezurex Private E-2

    bump bummmmp please. reply!
     
  3. mr_flea

    mr_flea First Sergeant

    what operating system? if it is XP, please specify home or pro
     
  4. rezurex

    rezurex Private E-2

    Professional. version 5.1 build 2600
     
  5. mr_flea

    mr_flea First Sergeant

    well, you can try editing the hosts file. It should redirect to a different site as described in the hosts file.

    click start, click run, type the following line (without the quotes) "%SystemRoot%\system32\notepad.exe C:\windows\system32\drivers\etc\hosts"

    edit the hosts file as described by the comments in it. (the lines that start with #)
     
  6. rezurex

    rezurex Private E-2

    doing so... how can you redirect it to the localhost pc website? you would have to enable it somehow... i'm not sure how to do that... any help would be appreciated on that :)
     
  7. mr_flea

    mr_flea First Sergeant

    well, you could use IIS (since you have xp pro) but you might be able to redirect to a simple html file. If you just want a page that says in black text "blocked" or something like that, you could just use a text file. Reply back with what you would like best...
     
  8. rezurex

    rezurex Private E-2

    whats IIS?

    would it be possible to make an elaborate website? but if its too much of a hassle, a custom site saying "blocked" or something wouldn't be bad as well

    thanks :D
     
  9. mr_flea

    mr_flea First Sergeant

    IIS stands for Internet Information Services. It allows you to host a website.

    To make an elaborate website, you need to know HTML and possibly CSS or JavaScript. HTML isn't too hard, and CSS isn't either... JavaScript is harder though, but you probably won't need to use that. HTML is the minimum though, CSS and JavaScript are both used with HTML.
     
  10. rezurex

    rezurex Private E-2

    How can I get IIS on my system? I know HTML and Javascript. not CSS though, but I don't think I'll need CSS for my needs. Thanks again
     
  11. rezurex

    rezurex Private E-2

    I was wondering what the less elaborate method you mentioned before was about? about just using a text file? I am assuming you meant that all i needed was a simple HTML text file. But what i dont know is how to assign a local ip address to direct html traffic to. I guess thats where IIS comes in?
     
  12. mr_flea

    mr_flea First Sergeant

    IIS is already on windows xp professional, you just need to enable it. to enable IIS, go to start -> control panel -> add or remove programs -> click the add or remove windows components tab -> check the box next to Internet Information Services (IIS) -> click next -> insert cd if prompted -> click finish -> close the add/remove programs window -> open a blank Internet Explorer window -> type in the address bar: //localhost/ -> press enter or click the green go button -> a page should come up, if nothing does, STOP. if a page does come up, first read the page with the windows xp professional logo on the top, then follow the directions on the other page that was opened. since you already installed it and all the components you should need, click the "Quick site setup with IIS" link and follow the directions under "To publish content on your web site"

    HTML is a text file. The simple method was to just write something like "Access restricted" and save it as a html file (.htm), even though it's not a real html file.

    If you have anymore questions, please ask.
     
  13. rezurex

    rezurex Private E-2

    Hey mr_flea, thanks for all your help :D

    I have just one question about IIS. right now the default site is the name of my computer on the network so it would be http://pcname/

    i have a router on the network to route the cable modem. the local address for my pc is 192.168.0.3 but doing http://192.168.0.3 brings up a windows "log onto network" menu. however, when i ping my pcname on cmd it gives the ip 192.169.0.3 how can i change the name of the site? i dont want it to be http://pcname.

    I'm also having trouble using frontpage with IIS... one would think it would be a bit more straightforward, both being msft made and all. or it is, and im just stupid.. hehe

    thanks for all your help again
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds