0
votes
1answer
58 views

Why there is no use changing /etc/hosts

Here are the commands: [17:31:13 root etc]# cat /etc/hosts 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 127.0.0.2 myweb.com [17:31:25 root etc]# ping ...
0
votes
2answers
70 views

How to configure and access both local and remote versions of same website/domain?

I am working on a client's website which is currently hosted on an external remote server. I downloaded a copy of the site to my local computer, which is running a 'LAMP stack' set up on Arch Linux, ...
3
votes
2answers
717 views

LINUX Ping host, Display error on failure

I'm writing a bash script to ping a given hostname, and display whether or not the host is active (display a simple message.) Should be easy, but headache instead. Here is what I have so far: ...
0
votes
1answer
57 views

host to host translation in linux?

In Linux (fedora or cent OS, etc), I want to say if one program tries to download from one url, it goes to my host (my url) instead of what it tries to go. Something like /etc/hosts, but /etc/hosts is ...
3
votes
1answer
806 views

Hostname resolution of Linux machines with static IP

I have couple of linux servers that I to assign static IPs to because I'm doing some CARPing and Vlans. The way my DNS server is set, it gets the hostnames dynamically from the nodes, as soon as ...
1
vote
3answers
533 views

Locally redirecting domains (like with /etc/hosts) during certain hours of the day

folks. In the interest of upping my productivity, I'd like to selectively block or redirect certain websites in blocks of time during the day. I've already got some sites completely blocked in my ...
2
votes
1answer
2k views

Adding a line into the hosts file, getting permission denied when using sudo - Mac

I'm trying to add a line into the hosts file on my Mac by executing a one line command on the terminal. I thought this would be easy using sudo, but it returns "permission denied" when I try to add ...
1
vote
1answer
574 views

Are asterisks in /etc/hosts supposed to have any effect?

I have something like this in /etc/hosts: 192.168.0.1 example.com 192.168.0.1 *.example.com example.com is pinged to 192.168.0.1 as expected but pinging say sub.example.com outputs: ...
1
vote
0answers
425 views

How to redirect a URL to a certain IP, as with /etc/hosts?

Someone on my shared server has messed with some setting such that gethostbyname('www.google.com') (PHP) gives me the IP for his website, rather than Google. I believe this can be done via the ...
1
vote
1answer
108 views

Hosts not recognized?

Basically, nobody can establish a connection to anything I host. The website, teamspeak, and game servers. I think it may have something to do with the hosts file or network configuration, but I have ...
0
votes
1answer
515 views

Redirect a url to another url

I need to redirect a url to another url. THe PC where this should be done has Linux but no server program such as Apache. When the user type www.mycomerp.com, it should redirect it to ...
1
vote
1answer
505 views

how to properly edit hosts, hostname and resolf.conf?

I have been searching the Internet for a real nop tutorial on the subject but could not found any direct info. on how to edit these files the proper way. I have a Debian Internet server that I use to ...
0
votes
1answer
178 views

hostname and hostname -s differ

My /etc/hostname has: name.domain.net Previously, it was: old.domain2.net If I do hostame I get name.domain.net. But doing hostname -s returns old. According to the man page: -s, --short ...
1
vote
3answers
1k views

host(1) command only uses first nameserver?

According to the man page, host ought to query "the server or servers listed in /etc/resolv.conf," but it only uses the first entry in that file: thefourthtower:$cat /etc/resolv.conf nameserver ...
1
vote
2answers
525 views

What tools exist to override an IP from a DNS lookup per browser?

Up front: the per browser (or per process, if you will) part is the important part here. I'm well aware of the /etc/hosts(and its Windows counterpart), but would like to avoid this system-global ...
0
votes
2answers
3k views

How do I access internal network virtual hosts in Apache?

This might be a stupid question but I'm tired and can't find a solution. I currently have an Apache Web Server running on Ubuntu 10.4 and I use a DynDNS service to make them accessible to the ...
2
votes
1answer
977 views

How to block access to a website on Lucid Lynx?

I am trying to block a few websites on a lucid lynx, I tried editing /etc/hosts and that blocks access via url but the site still open if I enter the ip on the browser, how can I block ip access also? ...
3
votes
2answers
955 views

How to route somehost to other host with some port on linux?

Say I want to route all requests to google.com to localhost:333 , how to do so?
1
vote
5answers
742 views

How can I tell if I am SSH'd in somwhere already?

Is there an easy way to tell if I am SSH'd in somewhere without typing 'exit'? Like, if I am currently sitting at computer A and I SSH'd to computer B and then from B to computer C, is there a way I ...