Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Thorth

Pages: [1] 2
1
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 25, 2024, 05:18:03 PM »
Alright so i try the rebuild of the server.
On rebuild of the server /etc/postfix/transport will reset so is need it to add again so everyone will try this solution, must remember this, on every rebuild transport file will reset and need to be completed with the domains and the command
Code: [Select]
postmap /etc/postfix/transport must be run again

2
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 25, 2024, 02:05:53 PM »
I did not check this, but it's a good point, i should check soon. Also idk maybe it's a good idea for cwp since there is an option there for email exchange i think is the same, to add this option, to relay emails. I'll be back with the situation after rebuild postfix

3
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 25, 2024, 12:55:10 PM »
Hi again.
I found out the solution for this issue.
So basically since they are in a private network (those two VM, have local ip) there is a conflict on port 25 when they try to send internally between server.

The solution:


Edit
Code: [Select]
/etc/hosts and add the local IP and the domains from the other machine (the MX record for each)

Edit
Code: [Select]
/etc/postfix/transport and there add info from others domain like

  • DOMAIN.com              smtp:192.168.0.XX:25
  • .DOMAIN.com              smtp:192.168.0.XX:25

Run the command
Code: [Select]
postmap /etc/postfix/transport from terminal
 

What this solution will do is not seding the email via internet and relay the emails to the machine where is hosted, like an internal email. The details in transport file will filter emails based on domain. This way i was able to send emails both internal and to other domain outside the network.

4
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 21, 2024, 05:35:01 PM »
thank u very much for your help

No problem. I wish you to find root of the problem and solve it to get maximum from your infrastructure and CWP panel.

I will post here the solution i found, so if anybody get into the same issue maybe they can find the solution.

5
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 21, 2024, 11:52:00 AM »
If you disabled CSF/Firewall, dig, nslookup show correct answers but you can't connect to the port 25 of another VM then there is some networking problem. It could be your router or some other device used to manage traffic. I am afraid the CWP community is unable to help you with it because it requires deeper understanding of your infrastructure and network configuration.

I will check my router NAT config then.
thank u very much for your help

6
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 21, 2024, 09:59:46 AM »
1. Did you disable CSF/Firewall on both VMs ? Does it try to access the VM2 from VM1 using public or private IP ?

2. What did the test 2 show exactly when it failed ?

3. does "nslookup MX.DOMAIN.COM"  (replace MX.DOMAIN.COM with the actual MX record of the domain hosted on VM2) executed on VM1 shows the same result as "dig" ?

For 1:
  • Yes i did disabled firewall on both VM
  • he try to access VM2 using public ip

For 2:
  • Connection refused print-screen down


For 3:
  • Post the picture below with all comands (nslookup, dig, telnet)

7
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 20, 2024, 07:34:32 PM »
Disable CSF/IPtables and run tests 2,3 again. If the tests are passed with the disabled CSF/iptables then check your CSF/iptables  rules.
Test 2 failed buit test 3 work, i got the traceroute for test 3

8
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 20, 2024, 03:36:15 PM »
Remove any extra lines from /etc/hosts added by you:

1. On VM1 can you resolve the MX records of the domain hosted on VM2 ?
2. Can you connect to the port 25 from VM1 to the host/IP resolved in p1 ?
3. Does the traceroute command executed on VM1 to the host/ip resolved in p1 look good (VM2 is accessible) ?

i remove all the line from
Code: [Select]
/etc/hosts
 For 1.
  • dig command work & get the correct response (on the main domain)
  • dig command & ping on mx record is ok i get the response

For 2.
  • the connection is refused when i try to telnet from vm1 to vm2

For 3.
  • traceroute is not permited


9
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 20, 2024, 01:31:27 PM »
Maybe i did not express myself correctly.

Everything outside is working, outgoing mails, income mails, rDNS, PTR, DKIM, NS, etc.

With all the tools used to test the conf. (starting from mxtoolbox, mail-tester.com to diff. dns checkers, etc) got a green response and
 everything is ok, i can send and receive (emails) from others domains outside VMs network.

If i try to telnet, curl, ping, dig. whatever from others servers, everything is working and got a correct response.

My problem is between my VMs inside the same network.

I don't how to check, cuz' with all the commands i know everything is ok (i used them from outside my network, diff servers, ip etc.).

I don't know how DNS MX record should look so everything is ok between my 2 WM.

10
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 20, 2024, 09:34:32 AM »
Hey again.
So i start to check my
Code: [Select]
/etc/hosts and with small modification i add the mx record to my host file, when i try to telnet on port 25 i got the response    ;D

But when i try to send an email i still get refused by postfix.
Is there an option to config on postfix to check for internal servers or smt like that, i'm asking this since the both VM are in the same local network.

11
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 15, 2024, 06:00:55 PM »
Looks like you need to check your configuration in your NAT on your router to your internal IPs.

Again, ports can only be forwarded to 1 internal IP, not multiple.
And even then things get tricky, because unless you can set your rDNS correctly, SSL, etc. won't work like they should.
all the other options are working correctly, webservsers, ssl, etc even emails to gmail, yahoo, or other domain.

I'm wonder if on postfix there is some options, idk to set other local ip to check, since when i try to curl from 1 vm to another i had to add those details in /etc/hosts ... or maybe i should add on /etc/hosts the public ip and the domain...

i ask a person that know some rules, and he said to me to check the IP that he send the emails (is internal or public)...

i'll keep search for a solution, but if u any of u got any idea what to do, or what to test i'm here for it

12
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 15, 2024, 05:56:32 PM »
It looks like the problem is caused by misconfiguration (invalid A,MX,CNAME records) of the DNS zones of the domains and/or by DNS resolvers on your VMs.

So my recommendation is to check the DNS zones and resolvers on both VMs.
thanks for the reply.
On both vm everything is ok, rDNS, CNAME, etc... double check those info.
Maybe i need to add smt more on dns manager.
this is my DNS record for MX

rDNS is correct, all my emails to Yahoo, gmail etc are delivered and everything is ok.

13
Postfix / Re: connection refused to a domain on another virtual machine
« on: October 13, 2024, 09:34:04 AM »
Hey.
Sorry to reply after all this long time.

So first i telnet & traceroute to the domain (not the mx record) both gave me answer and it's correct, since i add in
Code: [Select]
/etc/hosts the domains with internal ip (192.168...), i need to curl data from 1 server to another.

Then i try to telnet & traceroute to the mx record (mail is the record for MX) and nothing, no answer.
I add on both server on /etc/hosts  192.168.0.x mail.domain.com and both telnet & traceroute give me answer.

When i try to send an email from 1 server to another, in mail queue, nothing, still refusing my email.


I notice that the port 25 is open only on TCP and not on UDP...


14
Postfix / Re: connection refused to a domain on another virtual machine
« on: September 23, 2024, 05:05:45 PM »
Thanks for your reply.

Basically i have an IaaS (Infrastructure as a Service) where i can make VM, VPN, etc.
IaaS managing for me DDOS, mirroring servers, back-up space, etc. (at a big lvl)

On that console i set the network adapter for in/out from public IP to private IP in any direction with any port, so not using the NAT ip from CentOS WebPanel.

rDNS is set for the main domain and IP of the server.

I also set Dmark, SPF, DKIM, based on the several online tools, my email server is set correctly.

I can send emails for any other domains that are outside my VM (gmail, yahoo, ymail, etc) and everything is working like a charm.

I ran into a similar problem when i try to curl from VM1 to VM2, i added in /etc/hosts the domain with the local ip and curl work perfectly. I'm wondering if i have to do something similar.

Also 25, 465, 587 are open both direction, do i need to add in some conf file the same option like i did in /etc/hosts?





15
E-Mail / Re: Can email other servers, but not my other CWP server
« on: September 23, 2024, 02:53:21 PM »
Hi.
I have the same issue, two virtual machine each with his own public IP.
Connection refused between domains hosted on those vm.
I just post a topic on "postfix".
Only thing i see in log "Connection refused".
Did u solved your issue ?
thanks

Pages: [1] 2