Incoming mail problem and LAN connection problem

Also looking at 3rd image and looking on https://dnschecker.org/ your server is not reachable, it cannot see any A record, MX or even NS records for elektrikakademi.com. Looking more and more like a DNS issue here, along with a potential firewall issue as I can see port 22 open from the internet, but important ports like 53, essential for DNS is closed and 80 essential for http. Check your firewall first and then when your ports are open, cheack all your server DNS settings. Hope that's a little help, giving you somewhere to start
My ports are open and no firewall other than csf is running. This DNS problem does not exist 2 weeks ago. I changed nothing but this problem occured:(
 
And I have new problems. After these changes, my server cant connect to internet and after I added dhcp4: no dhcp6:: no accept-ra: no I couldnt connect my server locally:D
Sorry, was editing my post above to add in other bits. Remove those from your cloud-init file (sorry to mess you about) and try and sort out the firewall issue first as the essential ports you need open appear closed. Also as I said in a previous post, your server is reverting to localhost fe80::1 to lookup DNS records. Add in IPv6 IP addresses to the nameserver sections I mention earlier up in this thread and this should force Ubuntu to favour your assigned IPv6 addresses to resolve, rather than using localhost.
 
just test it by use this command from outside your datacenter .
Code:
dig your.domain.here @{Server_IP}
while trying to fixed the connection problem.


p.s. relate to "/etc/resolve.conf", don't use "127.0.0.1" (local resolve), it's gonna create some weird problem.
 
Sorry, was editing my post above to add in other bits. Remove those from your cloud-init file (sorry to mess you about) and try and sort out the firewall issue first as the essential ports you need open appear closed. Also as I said in a previous post, your server is reverting to localhost fe80::1 to lookup DNS records. Add in IPv6 IP addresses to the nameserver sections I mention earlier up in this thread and this should force Ubuntu to favour your assigned IPv6 addresses to resolve, rather than using localhost.
where is the location of cloud-init file? I couldnt find
 
where is the location of cloud-init file? I couldnt find
If you're using Ubuntu 24.04 as you said earlier, you may be using netplan for your networking.

In my Ubuntu 24.04 setup, using netplan, the file's 50-cloud-init.yaml and it's located in /etc/netplan/
 
If you're using Ubuntu 24.04 as you said earlier, you may be using netplan for your networking.

In my Ubuntu 24.04 setup, using netplan, the file's 50-cloud-init.yaml and it's located in /etc/netplan/
Yes I have netplan. Since I reinstalled everthing, I only have
network:
version: 2
ethernets:
eth0:
optional: true
dhcp4: true
 
just test it by use this command from outside your datacenter .
Code:
dig your.domain.here @{Server_IP}
while trying to fixed the connection problem.


p.s. relate to "/etc/resolve.conf", don't use "127.0.0.1" (local resolve), it's gonna create some weird problem.
My resolv.conf file contains:

nameserver 127.0.0.53
options edns0 trust-ad
search .

Anything need to be changed?
 
Sorry, was editing my post above to add in other bits. Remove those from your cloud-init file (sorry to mess you about) and try and sort out the firewall issue first as the essential ports you need open appear closed. Also as I said in a previous post, your server is reverting to localhost fe80::1 to lookup DNS records. Add in IPv6 IP addresses to the nameserver sections I mention earlier up in this thread and this should force Ubuntu to favour your assigned IPv6 addresses to resolve, rather than using localhost.
How can I add IPv6 to nameservers? Can you clarify?
 
How can I add IPv6 to nameservers? Can you clarify?
Earlier you showed a screenshot of your resolvectl output and it was using localhost (fe80::1) as the DNS,

Adding ipv6 nameservers to your files is quite easy.

In your /etc/netplan/50-cloud-init.yaml file:
Code:
nameservers:
        addresses: [1.1.1.1, 8.8.8.8, 2606:4700:4700::1111, 2001:4860:4860::8888]
#netplan try
#netplan apply

in your /etc/systemd/resolved.conf
Code:
[Resolve]
DNS=8.8.8.8 1.1.1.1 2001:4860:4860::8888 2606:4700:4700::1111 
FallbackDNS=8.8.4.4 1.0.0.1 2001:4860:4860::8844 2606:4700:4700::1001
Domains=.~
#systemctl restart systemd-resolved

That should force the DNS to use google and cloudflare ipv4 and ipv6 when looking up and resolving domains from your server.

You could always disable ipv6 altogether on your server if you wished (can be done simply with grub)

One thing that does worry me about your install is the "dhcp4: true" which means your server doesn't have a static IP. This can be a problem if you haven't got the correct IP mapped in your router so the internet can see the server. Set a static address if you're able.
 
Yes I have netplan. Since I reinstalled everthing, I only have
network:
version: 2
ethernets:
eth0:
optional: true
dhcp4: true
This is one of my netplan files. (I don't use ipv6 on this specific server)
Code:
network:
  version: 2
  ethernets:
    ens18:
      addresses:
      - "10.0.29.2/29"
      routes:
      - to: "default"
        via: "10.0.29.1"
      nameservers:
        addresses: [1.1.1.1, 8.8.8.8]

Replace 10.0.29.2/29 with a permanent IP address and cidr you can use on your router.. Replace 10.0.29.1 with the 1st IP in the subnet you're assigning your server, or the gateway IP of your router if on same subnet. Here I have a CIDR of 29 giving me 8 IP addresses (6 of which useable) in a small subnet.

For example: 192.168.0.x or 192.168.1.x are the common IP addresses you'll find on most home routers. Most have a subnet of 255.255.255.0 which means you would use 192.168.0.x/24 as the static IP and 192.168.0.1 for the gateway Or 192.168.1.x/24 as the static IP and 192.168.1.1 for the gateway.

Hope this helps
 
Earlier you showed a screenshot of your resolvectl output and it was using localhost (fe80::1) as the DNS,

Adding ipv6 nameservers to your files is quite easy.

In your /etc/netplan/50-cloud-init.yaml file:
Code:
nameservers:
        addresses: [1.1.1.1, 8.8.8.8, 2606:4700:4700::1111, 2001:4860:4860::8888]
#netplan try
#netplan apply

in your /etc/systemd/resolved.conf
Code:
[Resolve]
DNS=8.8.8.8 1.1.1.1 2001:4860:4860::8888 2606:4700:4700::1111
FallbackDNS=8.8.4.4 1.0.0.1 2001:4860:4860::8844 2606:4700:4700::1001
Domains=.~
#systemctl restart systemd-resolved

That should force the DNS to use google and cloudflare ipv4 and ipv6 when looking up and resolving domains from your server.

You could always disable ipv6 altogether on your server if you wished (can be done simply with grub)

One thing that does worry me about your install is the "dhcp4: true" which means your server doesn't have a static IP. This can be a problem if you haven't got the correct IP mapped in your router so the internet can see the server. Set a static address if you're able.
I have a static ip both from my router and from my Internet Service Provider. I will try your suggestions. Thank you for your help.
 
This is one of my netplan files. (I don't use ipv6 on this specific server)
Code:
network:
  version: 2
  ethernets:
    ens18:
      addresses:
      - "10.0.29.2/29"
      routes:
      - to: "default"
        via: "10.0.29.1"
      nameservers:
        addresses: [1.1.1.1, 8.8.8.8]

Replace 10.0.29.2/29 with a permanent IP address and cidr you can use on your router.. Replace 10.0.29.1 with the 1st IP in the subnet you're assigning your server, or the gateway IP of your router if on same subnet. Here I have a CIDR of 29 giving me 8 IP addresses (6 of which useable) in a small subnet.

For example: 192.168.0.x or 192.168.1.x are the common IP addresses you'll find on most home routers. Most have a subnet of 255.255.255.0 which means you would use 192.168.0.x/24 as the static IP and 192.168.0.1 for the gateway Or 192.168.1.x/24 as the static IP and 192.168.1.1 for the gateway.

Hope this helps
When I edit my netplan as your suggestion, after netplan try, my server kicked me from ssh:D I was connected from same network.
 
When I edit my netplan as your suggestion, after netplan try, my server kicked me from ssh:D I was connected from same network.
If you're assigning a static local IP as per what I posted earlier, upon rebooting, or setting the network variables, it will kick you from SSH as you'll be going from an IP that has been issued to your device from your router via DHCP, to telling your router "I want THIS to stay as my IP" which will probably be different from the DHCP assigned one.

If you set a static IP on the server, SSH into the server with the new IP address you've assigned it.
 
just test it by use this command from outside your datacenter .
Code:
dig your.domain.here @{Server_IP}
while trying to fixed the connection problem.


p.s. relate to "/etc/resolve.conf", don't use "127.0.0.1" (local resolve), it's gonna create some weird problem.
When I use dig from outside network, i got this
 

Attachments

  • 4.png
    4.png
    88.5 KB · Views: 10
If you're assigning a static local IP as per what I posted earlier, upon rebooting, or setting the network variables, it will kick you from SSH as you'll be going from an IP that has been issued to your device from your router via DHCP, to telling your router "I want THIS to stay as my IP" which will probably be different from the DHCP assigned one.

If you set a static IP on the server, SSH into the server with the new IP address you've assigned it.
I set both static ip 192.168.1.100 both on server and my router but can not connect now after editing netplan
 
I set both static ip 192.168.1.100 both on server and my router but can not connect now after editing netplan
There's obviously something amiss with your installation. If you can only get connected with DHCP on in Netplan, that's what you may have to roll with, but it's far from ideal for a server setup, unless you can tie that IP to the MAC in the router and it should just issue the 1 IP everytime. That aside, once you have connectivity we need to find out why your other ports aren't visible to the net. You had 22, 80 and 443, 2222 open earlier but 53, 25 and all the file transfer/mail ports were closed. If you get the local DNS sorted you'll be on the right track
 
Just to be sure. Did you register your nameservers at your domain registrar?
Because I can't find them with a dig command, so it looks like it's only spread because it's present in DA, but you have to also set them at your registrar. Did you do that?
 
Just to be sure. Did you register your nameservers at your domain registrar?
Because I can't find them with a dig command, so it looks like it's only spread because it's present in DA, but you have to also set them at your registrar. Did you do that?
Yes I registered at my domain registrar.
 
There's obviously something amiss with your installation. If you can only get connected with DHCP on in Netplan, that's what you may have to roll with, but it's far from ideal for a server setup, unless you can tie that IP to the MAC in the router and it should just issue the 1 IP everytime. That aside, once you have connectivity we need to find out why your other ports aren't visible to the net. You had 22, 80 and 443, 2222 open earlier but 53, 25 and all the file transfer/mail ports were closed. If you get the local DNS sorted you'll be on the right track
I reinstalled server and directadmin. For now, only port 53 can not be reached outside the server network. All other ports are working. I dont understand why directadmin does not work directly after a fresh install
 
Yes I registered at my domain registrar.
Well that is very odd. Because then with a dig -t NS on your domainname, then I should always get the NS records, even if your nameservers are not working or are offline.
And this is not the case at the moment.
I would suggest to contact your domain name registrar and have them kick the nameservers again.
 
Back
Top