Why CentOS lost its network interface? - centos

I have a CentOS 7 VPS which I had multiple sites on its Apache, and these days I faced a strange problem, CentOS lost its interface many times a day! and I should restart the interface to recover this situation! I've take a snapshot from Web console interface of my VPS, any idea? thanks in advance
grep dhclient /var/log/messages ferquently give me this error (also I have BOOTPROTO="dhcp" in my config file) :
Apr 30 15:12:56 vultr dhclient[8962]: dhclient.c:2676: Failed to send 300 byte long packet over fallback interface.
Apr 30 15:13:15 vultr dhclient[8962]: DHCPREQUEST on eth0 to 169.254.169.254 port 67 (xid=0x5f5ca74d)
Apr 30 15:13:15 vultr dhclient[8962]: send_packet: Network is unreachable
Apr 30 15:13:15 vultr dhclient[8962]: send_packet: please consult README file regarding broadcast address.

(I work for the host in this case)
There was an issue with the DHCP server that was causing some instances to lose their IP address on DHCP lease renewal. Specifically, the DHCP server would intermittently respond with a NAK, which would cause the server to lose it's IP address. Oddly, CentOS 7 doesn't seem to handle this nicely (nice behavior would be trying to obtain a new lease, rather then breaking connectivity until the interface was restarted).
You should no longer see issues with this.

Related

VLAN Trunk and VRFs on Ubuntu 22.04 Server

so i need the following setup:
i have a Ubuntu 22.04 Server with 2 interfaces.
ens160: Management
ens192: Data
What i need to do is run the same docker application 10 times on this server. Since this should be a lab environment, all IP addresses the client machines connect to should be the same.
So what i came up with, is to have 10 VLANS (301 - 310) on a trunk on interface ens192. Each of this vlan should be in its own VRF and have the same IP address ( 10.0.0.252 ).
I cant figure out what the best way it is to configure this setup. I tried netplan but couldnt get it to work.
Can someone help me out here waht the best way is to accomplish this and how?
Best regards

PaloAlto<->WindowsServer (RRAS) VPN proxy id (traffic selector) mismatch

would you please help me with the following situation ?
I have a Windows server machine on the internet that establishes a site-to-site ikev2 connection to my client's PaloAlto appliance (using RRAS and Add-VpnS2SInterface powershell command on my side). So far, no problem the link goes up without error.
There are two private adresses on my side (10.0.0.19 and 10.0.0.20) that need to communicate to (private) address 10.0.0.18 on my client's side. The problem is that when i don't set up traffic selectors (using Add-VpnS2SInterface -LocalVpnTrafficSelector -RemoteVpnTrafficSelector) on my connection, address 19 can access adress 18 but address 20 can not ! if i set up a local TS for address 20 and a remote TS for address 18, address 20 can reach 18 (and 19 can not). If i try any combination of local TS with 19 and 20, 20 still can not reach 18. On the client's side, proxy ids are set up like this : proxyid_config
The TS/proxyid mismatch is logged when i use the command netsh ras set tracing * enable. It literally says "TS Mismatch". I've tried wireshark on the connection but i can not find the decryption table infos in RRAS (SK_ei, SK_ar, ...). Of course my client is no help in this since he is unable (or unwilling) to dig into his logs and "it works for every other connections"
So i'm left with many questions :
is it "ok" to set up proxy ids like he did ?
why 19 works by default but can not work in conjunction with 20 (20 works on his own too)
can i find wireshark infos (SK_ei, SK_ar, ...) in RRAS to decrypt the traffic ?
where to look in PaloAlto to diagnose the error ?
Thank you for reading, hope you can help =)

Need help dealing with repeated SPAMHAUS listings at small company

Setup: We have a mail server running exchange 2010 and a windows server 2011 for active directory. We also have a draytek router. I have access to all these things just not super familiar.
I work for a company as a junior IT tech so I have not set any of this up but need to find a solution. We're getting added to the spamhaus blocklist every other week or so.
What i've tried so far:
I have scanned the 30 computers with about 5 different virus scanners and mostly found minor things with malwarebytes which have been removed but we keep getting listed.
Also tried running netstat on each PC to monitor port 25 connections but none of the PC's checked seemed to be sending out of this port.
I have access to the router and can login to it and have heard about blocking port 25 but whenever I do this no one can send emails out. On the dreytek syslogs I can see an IP address from a virtual server that is 190.2.141.250 connecting to our main server on port 25 (SMPT). I suspect this is the thing that is sending out the spam but I can't find out how to block it.
I am kinda lost so any ideas would be appreciated

NTP deamon runs slow

I have been using the NTP protocol for a while. Lately, I have encountered a strange issue. Namely, when I try to print a list of the peers known to the server it takes around 20 seconds. Earlier it took less time.
[root#centos-test centos]# time ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp1.tp.pl .MRS. 1 u 18 64 3 2.093 -0.021 0.098
ntp2.tp.pl .MRS. 1 u 22 64 3 2.404 0.120 0.041
96-7.cpe.smnt.p 149.156.70.75 2 u 27 64 3 22.526 -2.296 0.089
ntp.wide-net.pl 194.146.251.101 2 u 30 64 3 65.808 -8.530 0.049
real 0m20.180s
user 0m0.017s
sys 0m0.011s
I have restarted everything. I have changed the pools but without any significant effect.
It looks like it may be an issue with your DNS resolvers.
When you ask ntp for peer or host details by default it will try and resolve the reverse DNS names for any listed hosts. If your resolvers are slow, or there are DNS issues then that will hang your response and explain the situation you are seeing.
If you try the same command with the -n flag that will tell ntp to only return the IP addresses and not attempt a DNS lookup.
The command in your case would be; time ntpq -p -n I'd suggest that you check what DNS servers you have setup in /etc/resolv.conf and change them - but do note, if your host gets its own IP address via DHCP then the resolv.conf might get updated when your address refreshes, or changes.

Sendmail is unable to send letters to the internet (only local mail is being sent)

I'm using centos 5 and sendmail on intranet server. Local mail is being delivered perfectly, but when i try to deliver email to gmail, for example (or any other service outside intranet) i find following errors in my logs:
Jan 16 16:50:32 testlink sendmail[27713]: r0GCoVi5027711: to=<example#gmail.com>,
ctladdr=<webdev#testlink.ru.corp.domain.com> (502/502), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=120332, relay=alt4.gmail-smtp-in.l.google.com.
[173.194.68.27], dsn=4.0.0, stat=Deferred:
Connection refused by alt4.gmail-smtp-in.l.google.com.
one more important thing - server is not accessible from internet, but i can access internet from my server..
Please advice where should i search the problem.. i understand that i should setup sendmail somehow (currently i'm using default configuration that was set by yum), but what settings (or at least direction)... Thanks in advance!
run ifconfig in command line. perhaps something is wrong with your IP
also look into iptables -L
netstat -nap should have a string
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 5275/sendmail
check if provider blocks port 25:
telnet smtp.ukr.net 25