tag:blogger.com,1999:blog-2807403883562053852.post6903411175980695579..comments2024-03-27T08:40:31.785-06:00Comments on Clayton Cramer.: Silly Linux QuestionClayton Cramerhttp://www.blogger.com/profile/03258083387204776812noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-2807403883562053852.post-3312836258807468962016-09-10T21:00:21.735-06:002016-09-10T21:00:21.735-06:00Michael: Unfortunately, this Tenda router seems to...Michael: Unfortunately, this Tenda router seems to have no way to access the DHCP settings. Easy to plug in as appliance. I think I am going to make all my Linux boxes fixed IP in their /etc/hosts files.Clayton Cramerhttps://www.blogger.com/profile/03258083387204776812noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-32648099058452060072016-09-10T20:07:05.711-06:002016-09-10T20:07:05.711-06:00I define all of my IP devices in my router's D...I define all of my IP devices in my router's DHCP section by MAC address. I not only assign them an IP address, but a Host Name.Michael The Magnificenthttps://www.blogger.com/profile/03820094319077676224noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-48547779169633823132016-09-10T19:34:10.273-06:002016-09-10T19:34:10.273-06:00SJ: No problem setting up Linux boxes with both DH...SJ: No problem setting up Linux boxes with both DHCP and fixed IP addresses? It's ugly, but easier than trying to get the DHCP list from the router. Is there some painless way to copy the /etc/hosts file to all my Linux boxes, or just plan on doing an scp each time I add a new host and update it on one box?Clayton Cramerhttps://www.blogger.com/profile/03258083387204776812noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-29047586133377862222016-09-10T07:55:38.347-06:002016-09-10T07:55:38.347-06:00I don't know much about convincing Linux to fi...I don't know much about convincing Linux to find hostnames via local DNS. There are ways to do it manually, usually with a tool like nmap or arp-scan.<br /><br /><br /><br />But I do know this: all the comments about /etc/hosts assume a list of hosts with static IP addresses.<br /><br />On my in-house network, the router is configured to offer dynamic IP addresses in a certain range. (Let's say, "192.168.100.100" to "192.168.100.200".) I let most WiFi access, and the Windows machine, get their IP from the router in that way.<br /><br />Then, I configure most Linux machines to claim static IPs in a lower range. (Say, addresses in the range 192.168.100.25 to 192.168.100.30)<br /><br />Every time I add a machine, I have to add that machine-name, plus its new IP, to the "/etc/hosts" list of all Linux machines on the network. I also have to set up the static IP config file to use the router's internal address as a Gateway, and to use either the router or the ISP as a source for DNS resolution for the internet. (This is in /etc/resolv.conf on most Linux installations, where DNS-name servers can be referenced. You can add multiple sources to this listing; I think they will be queried in the order listed in the file. <b>If</b> you add an internal DNS to your network, you will need to reference that server in this file on any Linux host that wants to use the DNS.)<br /><br />I think that there is an equivalent file to /etc/hosts somewhere in the C:\Windows\ directory, if you wish to set up the same listing on a Windows machine. I think Windows will let you use static IP addresses, but it's been ages since I tried. Windows-Static-IP's will definitely need a gateway and a list of DNS-resolution-addresses.<br /><br />A related thought...if you have multiple routers, you first want to figure out which ones are offering DNS, what IP ranges they are handling, and how all the segments talk to each other. SJhttps://www.blogger.com/profile/12043843405366080460noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-70921556572755997642016-09-09T16:21:42.458-06:002016-09-09T16:21:42.458-06:00(a) You do not want to "rsh hostname". Y...(a) You do not want to "rsh hostname". You want to "ssh hostname". Rsh considered harmful. <br />(b) You can try something like this: http://linux.die.net/man/8/avahi-daemon also: https://wiki.archlinux.org/index.php/avahi This might help with RHEL: https://gist.github.com/hgfischer/885080 Debian https://wiki.debian.org/ZeroConf <br /><br />Or if you have a really small number of machines you can edit /etc/hosts directly. Billy Oblivionhttps://www.blogger.com/profile/16282343088921248885noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-31599562002477938562016-09-09T11:52:18.558-06:002016-09-09T11:52:18.558-06:00Since these are static ip's on your private in...Since these are static ip's on your private internal network it would be easiest to follow the suggestion of just adding entries in /etc/hosts. That is how I've done it on my home and test lab networks for over 20 years (I was running Unix workstations at home back in the 90's).<br /><br />whttps://www.blogger.com/profile/10067896665279403979noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-42403188214553034772016-09-09T07:15:05.532-06:002016-09-09T07:15:05.532-06:001. Don't use rsh. Rsh in ancient, probably n...1. Don't use rsh. Rsh in ancient, probably not very well supported and Considered Bad. OTH, on Linux Mint rsh is a symlink to ssh and rsh isn't even available anymore.<br /><br />2. On a small network you can add all of your hosts to /etc/hosts and you can then use rsh *shudder* or even better, ssh to connect to them.<br /><br /> /etc/hosts should already have at least one entry (depending on what flavor of Linux your are running) to use as an example:<br /><br /> 127.0.0.1 localhost<br /><br />Just add more hosts below that. The syntax is:<br /> IPADDR HOSTNAME ALIAS<br /><br />On an internal network you only need the first two. For publicly reachable systems you would use the fully qualified domain name as the second and then the short hostname as the third.<br /><br />So for a small, internal network:<br /><br />127.0.0.1 localhost<br />192.168.1.1 host1<br />192.168.1.2 host2<br /><br />Add the entries on every host and you should be able to $ ssh without using the IP.<br /><br />3. If you have a slightly larger network you can look into using dnsmasq and set one up as an internal DNS server. Knitebanehttps://www.blogger.com/profile/12561002953208884054noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-27007444873891305352016-09-09T06:56:16.189-06:002016-09-09T06:56:16.189-06:00I'm not sure Linux hosts advertise their hostn...I'm not sure Linux hosts advertise their hostnames on the LAN. (I could be wrong.)<br /><br />Possible plan B: Without setting up DNS for your LAN, you might put your<br />hostname->ip mapping in each Linux host's '/etc/hosts' file.<br /><br /> man 5 hosts<br />Paul Sandhttps://www.blogger.com/profile/06175388613093409161noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-27683885534247227472016-09-09T06:08:39.248-06:002016-09-09T06:08:39.248-06:00If you have a local dns server, grabbing the local...If you have a local dns server, grabbing the local zone file should work. If you don't have a local dns server, you probably should. You probably don't need more than a raspberry pi for your likely loads if you don't want to run the daemon on an existing linux box. TMLutashttps://www.blogger.com/profile/12033938954514865135noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-171013404373702182016-09-09T05:56:29.516-06:002016-09-09T05:56:29.516-06:00Edit /etc/hosts. Reference the Linux Network Adm...Edit /etc/hosts. Reference the Linux Network Adminstrators Guide for more complete details.Left Coast Conservativehttps://www.blogger.com/profile/05125102691834528348noreply@blogger.comtag:blogger.com,1999:blog-2807403883562053852.post-78799912757549871022016-09-08T21:36:17.532-06:002016-09-08T21:36:17.532-06:00Dont use RSH, use SSH. If you don't want to bo...Dont use RSH, use SSH. If you don't want to bother with a password, set up a certificate. Basically use ssh-keygen to make a key on the client, then take the public key from that client and put it in .ssh/authorized_keys of the account you want to be able to log on to. Sometimes it's authorized_keys2, but I think that's been mostly deprecated by this point.Sebastianhttps://www.blogger.com/profile/11539262551583143190noreply@blogger.com