LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting up name based virtual host on lan (http://www.linuxquestions.org/questions/linux-newbie-8/setting-up-name-based-virtual-host-on-lan-727862/)

shanecaldeiro 05-22-2009 03:00 PM

setting up name based virtual host on lan
 
192.168.129.108 is the testing server and 192.168.129.254 is the gateway. i want to remove the gateway so that it does not use the internet and the testing server shows me the page when i type www.shane.com

ECRocker 05-22-2009 03:39 PM

I wouldn't suggest that is the best way to accomplish your task. I would much rather create a firewall rule to block port 80, 443, and 8080...

Also, check to make sure it's not pulling up a cached page.

shanecaldeiro 05-22-2009 03:47 PM

Quote:

Originally Posted by ECRocker (Post 3549696)
I wouldn't suggest that is the best way to accomplish your task. I would much rather create a firewall rule to block port 80, 443, and 8080...

Also, check to make sure it's not pulling up a cached page.

how do i block the ports

Quakeboy02 05-22-2009 03:50 PM

Remove the gateway from the internet, and add a line to your /etc/hosts file to redirect www.shane.com to your testing server on your LAN. Don't forget that you've done this, though, and then come back and ask us why you can't get to your internet host. :)

shanecaldeiro 05-22-2009 04:04 PM

Quote:

Originally Posted by Quakeboy02 (Post 3549708)
Remove the gateway from the internet, and add a line to your /etc/hosts file to redirect www.shane.com to your testing server on your LAN. Don't forget that you've done this, though, and then come back and ask us why you can't get to your internet host. :)

I have remove the gateway using
route delete default gw 192.168.129.254

how do i redirect it to go to www.shane.com

Quakeboy02 05-22-2009 04:21 PM

Code:

man hosts

shanecaldeiro 05-22-2009 04:28 PM

Quote:

Originally Posted by Quakeboy02 (Post 3549728)
Code:

man hosts

i have added a line in the /etc/hosts file which is

192.168.129.108 www.shane.com

shanecaldeiro 05-22-2009 04:36 PM

Quote:

Originally Posted by shanecaldeiro (Post 3549735)
i have added a line in the /etc/hosts file which is

192.168.129.108 www.shane.com

when i ping www.shane.com its giving the ip 192.168.129.108 but when i browse www.shane.com its going to the internet and giving another site on the net

Quakeboy02 05-22-2009 04:46 PM

Quote:

Originally Posted by shanecaldeiro (Post 3549742)
when i ping www.shane.com its giving the ip 192.168.129.108 but when i browse www.shane.com its going to the internet and giving another site on the net

That doesn't sound right. Have you restarted your browser and cleared your browser's cache?

shanecaldeiro 05-22-2009 04:53 PM

Quote:

Originally Posted by shanecaldeiro (Post 3549742)
when i ping www.shane.com its giving the ip 192.168.129.108 but when i browse www.shane.com its going to the internet and giving another site on the net

thanks just have to change the network gateway to 192.168.129.108 on my system to totally disconnect from the internet which i cant because i dont have the privelege


All times are GMT -5. The time now is 02:21 PM.