Making progress running MTA container - Q re ports
People, Starting my MTA with: podman run --rm -d -h pricom.com.au \ -v /home:/home \ -p 127.0.0.1:25:25 \ -p 127.0.0.1:143:143 \ -p 127.0.0.1:587:587 \ -p 127.0.0.1:993:993 \ -p 127.0.0.1:995:995 \ --name indimail \ `podman images | grep indimail | awk '{ print $3 }'` \ indimail - works happily and while mail delivery is working fine within the container, the ports are not accessible from other computers ie: I have opened ports on the host using iptables and when using nmap on localhost get: Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:47 AEDT Nmap scan report for localhost (127.0.0.1) Host is up (0.0000050s latency). rDNS record for 127.0.0.1: localhost.localdomain Not shown: 993 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp filtered smtp 143/tcp filtered imap 587/tcp filtered submission 631/tcp open ipp 993/tcp filtered imaps 995/tcp filtered pop3s - which doesn't look promising and from another machine on the LAN I get: Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:44 AEDT Nmap scan report for phil (192.168.1.20) Host is up (0.00019s latency). rDNS record for 192.168.1.20: phil.pricom.com.au Not shown: 994 filtered ports PORT STATE SERVICE 22/tcp open ssh 25/tcp closed smtp 143/tcp closed imap 587/tcp closed submission 993/tcp closed imaps 995/tcp closed pop3s - so I must still missing something about linking container ports to the same host ports . . Suggestions? Thanks, Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: phil@pricom.com.au
On 3/26/20 23:04, Philip Rhoades wrote:
People,
Starting my MTA with:
podman run --rm -d -h pricom.com.au \ -v /home:/home \ -p 127.0.0.1:25:25 \ -p 127.0.0.1:143:143 \ -p 127.0.0.1:587:587 \ -p 127.0.0.1:993:993 \ -p 127.0.0.1:995:995 \ --name indimail \ `podman images | grep indimail | awk '{ print $3 }'` \ indimail
- works happily and while mail delivery is working fine within the container, the ports are not accessible from other computers ie:
I have opened ports on the host using iptables and when using nmap on localhost get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:47 AEDT Nmap scan report for localhost (127.0.0.1) Host is up (0.0000050s latency). rDNS record for 127.0.0.1: localhost.localdomain Not shown: 993 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp filtered smtp 143/tcp filtered imap 587/tcp filtered submission 631/tcp open ipp 993/tcp filtered imaps 995/tcp filtered pop3s
- which doesn't look promising and from another machine on the LAN I get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:44 AEDT Nmap scan report for phil (192.168.1.20) Host is up (0.00019s latency). rDNS record for 192.168.1.20: phil.pricom.com.au Not shown: 994 filtered ports PORT STATE SERVICE 22/tcp open ssh 25/tcp closed smtp 143/tcp closed imap 587/tcp closed submission 993/tcp closed imaps 995/tcp closed pop3s
- so I must still missing something about linking container ports to the same host ports . .
Suggestions?
Thanks,
Phil.
You have to open the ports in your firewall. Podman will NOT do this automatically. Management of the external firewall, is not something we believe the container runtime should be doing.
Hello, you bound your port to the localhost interface of your host, so other computers in the network are not *supposed* to have access to the port you exported from the container to your host. So, you either have to put in your network IP instead of 127.0.0.1 or just skip the IP completely and then the ports are accessible via the network. Or did I miss the point here? Greetings, Michael --------------------------------------- On Fri, 27 Mar 2020, Daniel Walsh wrote:
Date: Fri, 27 Mar 2020 12:17:23 -0400 From: Daniel Walsh <dwalsh@redhat.com> To: podman@lists.podman.io Subject: [Podman] Re: Making progress running MTA container - Q re ports
On 3/26/20 23:04, Philip Rhoades wrote:
People,
Starting my MTA with:
podman run --rm -d -h pricom.com.au \ -v /home:/home \ -p 127.0.0.1:25:25 \ -p 127.0.0.1:143:143 \ -p 127.0.0.1:587:587 \ -p 127.0.0.1:993:993 \ -p 127.0.0.1:995:995 \ --name indimail \ `podman images | grep indimail | awk '{ print $3 }'` \ indimail
- works happily and while mail delivery is working fine within the container, the ports are not accessible from other computers ie:
I have opened ports on the host using iptables and when using nmap on localhost get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:47 AEDT Nmap scan report for localhost (127.0.0.1) Host is up (0.0000050s latency). rDNS record for 127.0.0.1: localhost.localdomain Not shown: 993 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp filtered smtp 143/tcp filtered imap 587/tcp filtered submission 631/tcp open ipp 993/tcp filtered imaps 995/tcp filtered pop3s
- which doesn't look promising and from another machine on the LAN I get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:44 AEDT Nmap scan report for phil (192.168.1.20) Host is up (0.00019s latency). rDNS record for 192.168.1.20: phil.pricom.com.au Not shown: 994 filtered ports PORT STATE SERVICE 22/tcp open ssh 25/tcp closed smtp 143/tcp closed imap 587/tcp closed submission 993/tcp closed imaps 995/tcp closed pop3s
- so I must still missing something about linking container ports to the same host ports . .
Suggestions?
Thanks,
Phil.
You have to open the ports in your firewall. Podman will NOT do this automatically. Management of the external firewall, is not something we believe the container runtime should be doing. _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
Phillip, You say you've configured the firewall with iptables, but have you restarted it? I know it's a dumb question, but what's the output of: iptables -L Best Regards Scott M On Thu, Mar 26, 2020 at 11:05 PM Philip Rhoades <phil@pricom.com.au> wrote:
People,
Starting my MTA with:
podman run --rm -d -h pricom.com.au \ -v /home:/home \ -p 127.0.0.1:25:25 \ -p 127.0.0.1:143:143 \ -p 127.0.0.1:587:587 \ -p 127.0.0.1:993:993 \ -p 127.0.0.1:995:995 \ --name indimail \ `podman images | grep indimail | awk '{ print $3 }'` \ indimail
- works happily and while mail delivery is working fine within the container, the ports are not accessible from other computers ie:
I have opened ports on the host using iptables and when using nmap on localhost get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:47 AEDT Nmap scan report for localhost (127.0.0.1) Host is up (0.0000050s latency). rDNS record for 127.0.0.1: localhost.localdomain Not shown: 993 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp filtered smtp 143/tcp filtered imap 587/tcp filtered submission 631/tcp open ipp 993/tcp filtered imaps 995/tcp filtered pop3s
- which doesn't look promising and from another machine on the LAN I get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:44 AEDT Nmap scan report for phil (192.168.1.20) Host is up (0.00019s latency). rDNS record for 192.168.1.20: phil.pricom.com.au Not shown: 994 filtered ports PORT STATE SERVICE 22/tcp open ssh 25/tcp closed smtp 143/tcp closed imap 587/tcp closed submission 993/tcp closed imaps 995/tcp closed pop3s
- so I must still missing something about linking container ports to the same host ports . .
Suggestions?
Thanks,
Phil. -- Philip Rhoades
PO Box 896 Cowra NSW 2794 Australia E-mail: phil@pricom.com.au _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
-- -- [image: Summit Virtual Experience] <https://www.redhat.com/en/summit?sc_cid=7013a000002D2QxAAK> Scott McCarty Product Management - Containers, Red Hat Enterprise Linux & OpenShift Email: smccarty@redhat.com Phone: 312-660-3535 Cell: 330-807-1043 Web: http://crunchtools.com Using Azure Pipelines with Red Hat Universal Base Image and Quay.io: https://red.ht/2TvYo3Y
Daniel, Michael, Scott, Thanks for the responses - I had a mail that suggested:
podman run... --net=host ...
No port mappings; this will confirm connectivity, mail working etc. A lot depends on underlying network configuration that you are using.
- which seems to have resolved the issue! - although I am still not sure why the port mappings did not work . . Now I just need to sort out a few minor, non-podman issues but once that is done, I will post a summary update about the MTA podman install - I am only using it in a very light setup but it is capable of a multi-domain configuration with millions of users producing multi-millions of emails per day being delivered very fast. Regards, Phil. On 2020-03-27 14:04, Philip Rhoades wrote:
People,
Starting my MTA with:
podman run --rm -d -h pricom.com.au \ -v /home:/home \ -p 127.0.0.1:25:25 \ -p 127.0.0.1:143:143 \ -p 127.0.0.1:587:587 \ -p 127.0.0.1:993:993 \ -p 127.0.0.1:995:995 \ --name indimail \ `podman images | grep indimail | awk '{ print $3 }'` \ indimail
- works happily and while mail delivery is working fine within the container, the ports are not accessible from other computers ie:
I have opened ports on the host using iptables and when using nmap on localhost get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:47 AEDT Nmap scan report for localhost (127.0.0.1) Host is up (0.0000050s latency). rDNS record for 127.0.0.1: localhost.localdomain Not shown: 993 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp filtered smtp 143/tcp filtered imap 587/tcp filtered submission 631/tcp open ipp 993/tcp filtered imaps 995/tcp filtered pop3s
- which doesn't look promising and from another machine on the LAN I get:
Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-27 13:44 AEDT Nmap scan report for phil (192.168.1.20) Host is up (0.00019s latency). rDNS record for 192.168.1.20: phil.pricom.com.au Not shown: 994 filtered ports PORT STATE SERVICE 22/tcp open ssh 25/tcp closed smtp 143/tcp closed imap 587/tcp closed submission 993/tcp closed imaps 995/tcp closed pop3s
- so I must still missing something about linking container ports to the same host ports . .
Suggestions?
Thanks,
Phil.
-- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: phil@pricom.com.au
participants (4)
-
Daniel Walsh -
Michael Traxler -
Philip Rhoades -
Scott McCarty