Hi Andy, and all other reading here,
i schaffe in ZH 
I think, I have a problem with routing after forwarding the ports to the nethserver guest. As I did not find any useful information on how to do this with firewall-cmd commands, I am using the following sequence of iptables lines.
I read, that the problem with firewall-cmd is that it sets its rules after libvirt rules, so that it does not work. So here is what I do to open and forward a port:
iptables -I FORWARD -o virbr1 -d 162.168.10.25 -j ACCEPT
iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to 192.168.10.25:80
iptables -t nat -I PREROUTING -p tcp --dport 443 -j DNAT --to 192.168.10.25:443
iptables -t nat -I PREROUTING -p tcp --dport 22 -j DNAT --to 192.168.10.25:22
iptables -I FORWARD -o virbr1 -d 192.168.10.25 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -j MASQUERADE
iptables -A FORWARD -o virbr1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i virbr1 -o enp26s0 -j ACCEPT
iptables -A FORWARD -i virbr1 -o lo -j ACCEPT
This works for accessing ssh which is forwarded to the vm, so I thought, I am good. But I am not, as I still can resolve dns (checked by ping something).
But I cannot install any package:
yum install nethserver-squid
Loaded plugins: changelog, fastestmirror, nethserver_events
Loading mirror speeds from cached hostfile
- ce-base: anorien.csc.warwick.ac.uk
- ce-extras: anorien.csc.warwick.ac.uk
- ce-sclo-rh: anorien.csc.warwick.ac.uk
- ce-sclo-sclo: anorien.csc.warwick.ac.uk
- ce-updates: anorien.csc.warwick.ac.uk
- epel: ftp.plusline.net
- nethforge: mrmarkuz.dynu.net
- nethserver-base: mrmarkuz.dynu.net
- nethserver-updates: mrmarkuz.dynu.net
Resolving Dependencies
→ Running transaction check
—> Package nethserver-squid.noarch 0:1.10.5-1.ns7 will be installed
→ Processing Dependency: squid >= 3.5.20 for package: nethserver-squid-1.10.5-1.ns7.noarch
→ Running transaction check
—> Package squid.x86_64 7:3.5.20-999.ns7 will be installed
→ Processing Dependency: squid-migration-script for package: 7:squid-3.5.20-999.ns7.x86_64
→ Processing Dependency: perl(DBI) for package: 7:squid-3.5.20-999.ns7.x86_64
→ Processing Dependency: libltdl.so.7()(64bit) for package: 7:squid-3.5.20-999.ns7.x86_64
→ Processing Dependency: libecap.so.3()(64bit) for package: 7:squid-3.5.20-999.ns7.x86_64
→ Running transaction check
—> Package libecap.x86_64 0:1.0.0-1.el7 will be installed
—> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed
—> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
→ Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
→ Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
—> Package squid-migration-script.x86_64 7:3.5.20-999.ns7 will be installed
→ Running transaction check
—> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
→ Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
→ Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
→ Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
→ Running transaction check
—> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
→ Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================
Package Arch Version Repository Size
Installing:
nethserver-squid noarch 1.10.5-1.ns7 nethserver-updates 1.3 M
Installing for dependencies:
libecap x86_64 1.0.0-1.el7 ce-base 21 k
libtool-ltdl x86_64 2.4.2-22.el7_3 ce-base 49 k
perl-DBI x86_64 1.627-4.el7 ce-base 802 k
perl-Net-Daemon noarch 0.48-5.el7 ce-base 51 k
perl-PlRPC noarch 0.2020-14.el7 ce-base 36 k
squid x86_64 7:3.5.20-999.ns7 nethserver-base 3.1 M
squid-migration-script x86_64 7:3.5.20-999.ns7 nethserver-base 48 k
Transaction Summary
Install 1 Package (+7 Dependent packages)
Total download size: 5.4 M
Installed size: 19 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for nethserver-updates
No Presto metadata available for nethserver-base
No Presto metadata available for ce-base
libtool-ltdl-2.4.2-22.el7_3.x8 FAILED
http://mirror.crazynetwork.it/centos/7.7.1908/os/x86_64/Packages/libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn’t help to resolve this issue please use https://bugs.centos.org/.
libecap-1.0.0-1.el7.x86_64.rpm FAILED
http://centos.brisanet.com.br/7.7.1908/os/x86_64/Packages/libecap-1.0.0-1.el7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
perl-PlRPC-0.2020-14.el7.noarc FAILED
http://mirror.crazynetwork.it/centos/7.7.1908/os/x86_64/Packages/perl-PlRPC-0.2020-14.el7.noarch.rpm: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
perl-DBI-1.627-4.el7.x86_64.rp FAILED
http://centos.brisanet.com.br/7.7.1908/os/x86_64/Packages/perl-DBI-1.627-4.el7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
libtool-ltdl-2.4.2-22.el7_3.x8 FAILED
http://centos.brisanet.com.br/7.7.1908/os/x86_64/Packages/libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
l(…)
Error downloading packages:
7:squid-3.5.20-999.ns7.x86_64: [Errno 256] No more mirrors to try.
perl-Net-Daemon-0.48-5.el7.noarch: [Errno 256] No more mirrors to try.
nethserver-squid-1.10.5-1.ns7.noarch: [Errno 256] No more mirrors to try.
perl-PlRPC-0.2020-14.el7.noarch: [Errno 256] No more mirrors to try.
perl-DBI-1.627-4.el7.x86_64: [Errno 256] No more mirrors to try.
7:squid-migration-script-3.5.20-999.ns7.x86_64: [Errno 256] No more mirrors to try.
libecap-1.0.0-1.el7.x86_64: [Errno 256] No more mirrors to try.
libtool-ltdl-2.4.2-22.el7_3.x86_64: [Errno 256] No more mirrors to try.
Blockquote
So what am I missing? Is there an easier way to successfully portforward a port with firewall-cmd ? As soon as I reload cmd-firealld reload, I can successfully install a package, so it has to do with above sequence.
Btw. I think the problem with not being able to get a certificate is related with this, so I need some help. I will continue to search another way to portforward…