Getting complain message from radius server - linux

I am very new to Radius server, please give some advice if you know.
currently the basic configuration of Radius have been finished, while i am testing the server i got the following error:
/usr/local/radius/bin/radtest user password localhost 0 testing123
radclient:: Failed to find IP address for radius
radclient: Nothing to send
if you want to know further information for configuration please let me know.

It appears it can't resolve localhost, try /usr/local/radius/bin/radtest user password 127.0.0.1 0 testing123

Edit your /etc/hosts file and add add the hostname of your server to the aliases list of 127.0.0.1, like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 my-radius
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 my-radius

Related

Linux process/component sending frequent DNS queries to resolve the local hostname (but shouldn't)

I'm not a networking guru so could use some help. I am running a RHEL7 (Red Hat Enterprise Linux) VM (Virtual Machine) where some component on the OS is sending frequent DNS queries to resolve it's own local hostname to our main DNS server (which shouldn't be happening because the DNS server won't know anything about its address). Can anyone provide guidance as to how I can find out what component/service/process this is? It's filling our logs with 19k records over just hours and I need to find a way to fix this.
The hostname for the RHEL VM is spe1.2v29999999.dev.local , there is a static IP on this VM and it is 10.70.49.61. The /etc/hosts looks like:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost4 localhost4.localdomain4
I suspected it might be a java jar we have running on the VM, but I stopped it via systemctl stop MyJavaJar but after running a tcp dump via tcpdump -i any udp port 53, I could still see the queries happening.
Here are some examples from different days/times in the logs (both A and TXT records):
2020-05-05T13:53:50.189178+00:00 dns.green.blue.mycompany.com 127.0.0.1 <daemon.info> dnsmasq[20886]: 739 10.70.49.61/65078 query[A] spe1.2v29999999.dev.local from 10.70.49.61
2020-05-07T00:01:39.934899+00:00 dns.green.blue.mycompany.com 127.0.0.1 <daemon.info> dnsmasq[8615]: 27827 10.70.49.61/57348 reply spe1.2v29999999.dev.local is NXDOMAIN
2020-05-11T00:01:20.674688+00:00 dns.green.blue.mycompany.com 127.0.0.1 <daemon.info> dnsmasq[8615]: 130345 10.70.49.61/53321 query[TXT] bootstrap.spe1.2v29999999.dev.local from 10.70.49.61
Would making any changes to /etc/hostname, /etc/sysconfig, /var/named .zone files, /var/named.conf or /etc/named help? Can I do more with tcpdump? Thanks
Put:
127.0.0.1 spe1.2v29999999.dev.local
in /etc/hosts. This is done by default on many distros.

Why do I have to change the linux host name for postfix?

I am trying to install postfix on my debian server. This is kind of a "general purpose" machine.
The server is running an apache web server and a couple of applications in docker containers. I would like to add a postfix mail server. Every tutorial tells me to change my hostname to mail.mydomain.com, but as I understand the hostname applies to the entire System. This is not primarily a mailserver so I would prefer not to commit to a hostname for the mailserver only.
What is the purpose of naming my host mail.mydomain.com?? Apache works fine without naming the system mydomain.com.
Am I meant to have a separate machine for my mail server? Or should I try to put it in a docker container?
Actually no need to change the hostname. You will add an FQDN so that services like postfix can use it.
let's say your /etc/hosts looks like this:
127.0.0.1 myhostname localhost localhost.localdomain
::1 myhostname localhost localhost.localdomain
set the FQDN to make the hostname be an alias for it:
127.0.0.1 myhost.domain.com myhostname localhost localhost.localdomain
::1 myhost.domain.com myhostname localhost localhost.localdomain
Then you can verify by hostname --fqdn
myhost.domain.com
While hostname is same as before myhostname

can't telnet via IP but can via localhost

I started an instance on AWS ec2 and am trying to connect via my web browser to the app on the server running on port 3000. I've also turned off iptables...
I can telnet via telnet localhost 3000 and telnet 127.0.0.1 3000 but can't telnet via the hostname or ip like telnet ipaddress 3000.
When i do that, I get a connection refused. I think this has somethign to do with my hosts file but can't figure out what. My host file looks like this:
127.0.0.1 ip-108-205-72-168
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost6 localhost6.localdomain6
Provided that you gave the instance a public ip, have you checked the security groups? AWS security groups are associated with instances and apply inbound/outbound rules.
If you have already done that then my next step would probably be to make sure that the port is bound to the correct interface(s). ss -tupan | grep 3000
please make sure you iptable rules is right and can accessed by ip.
Could you confirm whether you using elastic IP over the amazon VM?
If yes, then it will do the entry in the host file automatically when you associate elastic IP to the EC2.
But if not, then need to do a manual entry.
Thanks,
SIM

Root can resolve localhost, while normal user cannot

I think I encounter a weird problem:
With a normal user: when I ping localhost, I got ping: unknown host localhost, when I ping 0.0.0.0 or 127.0.0.1, I got response.
With root: everything is fine.
Here is the content in /etc/hosts:
127.0.0.1 localhost.localdomain localhost
... [opt out]
I am using CentOS (rocks cluster system)
I guess that /etc/hosts is not readable by ordinary users. What are the permissions of that file?

Apache IP address working but localhost does not

I downloaded Apache2 and it is currently running. I typed in my IP address and it brings me to the "It Works!" page, however when I type in localhost or 127.0.0.1 I receive an error. Can someone tell me whats up?
check 127.0.0.1 able to ping or not with same machine.
check /etc/hosts file having 127.0.0.1 entry or not?
check in apache configuration file Listen 0.0.0.0:80 or not?

Resources