You are not logged in.

#1 2016-02-15 14:46:49

teetee1
Member
Registered: 2013-08-24
Posts: 13

potentially useful use of the hostname file

I am looking for a manual description about how to use the following syntax in the hostname file:
<IP1>:<port>@<IP2>

The possible use of this syntax is that if host has a service running and listening at <IP1> port <port>, it can redirect the request to <IP2> adapter (could be on the same host or a different machine) based on _blank_ criteria. I am trying to see if there is any more detailed information about this.

Don't know if this is the best group for this post (could be networking or system admin). Thanks.

Last edited by teetee1 (2016-02-15 14:47:15)

Offline

#2 2016-02-15 14:55:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: potentially useful use of the hostname file

Why do you think the hostname file is relevant for this?  The hostname file should be *just* your hostname, it doesn't contain information about IP addresses or services running on ports.

It sounds like you might be looking for port forwarding, which is (AFAIK) generally an option of firewalls.

Please describe what you actually want to accomplish, not what you think is the way to accomplish it.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2016-02-15 15:47:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: potentially useful use of the hostname file

The standard use for this is ad blocking; redirect all requests for www.failbook to 0.0.0.0, for example.

The manual is `man hosts`.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2016-02-15 15:54:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: potentially useful use of the hostname file

Wait, are we talking /etc/hosts or /etc/hostname? Two very different things.

Online

Board footer

Powered by FluxBB