LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-22-2009, 04:00 PM   #1
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Rep: Reputation: 15
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
 
Old 05-22-2009, 04:39 PM   #2
ECRocker
Member
 
Registered: May 2007
Distribution: RHEL 5, Ubuntu 9.10, Fedora 12
Posts: 85

Rep: Reputation: 17
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.
 
Old 05-22-2009, 04:47 PM   #3
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ECRocker View Post
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
 
Old 05-22-2009, 04:50 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
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.
 
Old 05-22-2009, 05:04 PM   #5
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Quakeboy02 View Post
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
 
Old 05-22-2009, 05:21 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Code:
man hosts
 
Old 05-22-2009, 05:28 PM   #7
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Quakeboy02 View Post
Code:
man hosts
i have added a line in the /etc/hosts file which is

192.168.129.108 www.shane.com
 
Old 05-22-2009, 05:36 PM   #8
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by shanecaldeiro View Post
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
 
Old 05-22-2009, 05:46 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by shanecaldeiro View Post
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?
 
Old 05-22-2009, 05:53 PM   #10
shanecaldeiro
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by shanecaldeiro View Post
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
 
  


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
Adding virtual interface for IP based virtual host pridefc Linux - General 6 03-16-2008 04:52 PM
configuring secured name based virtual host bzlaskar Linux - Security 4 04-19-2007 06:05 AM
virtual host and LAN hampeh Linux - Networking 1 03-02-2005 10:49 AM
How to configure the virtual host based name? gz_xmg Linux - Networking 0 12-28-2004 02:12 AM
Name Based Virtual Host problem helios007 Linux - Networking 6 12-21-2003 04:41 PM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration