Firewall-cmd of Lesson 40
Hello
Working on Firewall-cmd in Lesson 40. I do not understand why curl allows access to the web server from the local machine but not from a remote computer to the same URL. This is concerning because, in the LFCS exam, we will have only have access to a single host terminal and so need a reliable way to test firewall rules.
Context:
firewall-cmd is configured to block http, https services and port 80. However, it forwards port 8080 to port 80:
root@SandBox1:~# firewall-cmd --list-all
public (default, active)
interfaces: ens160
sources:
services: dhcpv6-client mysql ssh
ports:
protocols:
masquerade: no
forward-ports: port=8080:proto=tcp:toport=80:toaddr=
icmp-blocks:
rich rules:
Web server is running on port 80:
root@SandBox1:~# netstat -anp | grep apache2
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2424/apache2
Question:
Why does curl http://192.168.1.175 on the same host return a web page when port 80 is blocked? If I try to curl http://192.168.1.175 from a different, I get the expected behavior - Port 80: No route to host.
Best Regards
SMK
Comments
-
During the exam, you have access to your own machine, and you can test from there.
0 -
Hi:
I don't actually know specific exam content (I'm not allowed to) but I would doubt firewalld stuff is on the exam as ifirewalls are covered more thoroughly in LFS211 and are more appropriate in LFCE exam, not LFCS. Also, firewalld is still not as widely used and requires manual installation on some of the older systems the exam is given on as it was not yet in the packaging system.
I192.168.1.x is always a system on the local network; are all the systems you are talking about on the local network? (192.168.1.x is a reserved address and not visible from the Internet). Are you saying the firewall is not working when everything is on your workstation or laptop? I'd have to check, but the OS/kernel is smart enough to sense such things (it does it for routing for example) and uses loopback networking etc. But I don't off hand know about firewalls. Anyone can comment?
0
Categories
- All Categories
- 179 LFX Mentorship
- 179 LFX Mentorship: Linux Kernel
- 778 Linux Foundation IT Professional Programs
- 384 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 76 DevOps IT Professional Program - Discontinued
- 8 DevOps & GitOps IT Professional Program
- 104 Cloud Native Developer IT Professional Program
- 7.7K Training Courses & Learning Paths
- 21 AI & ML Training
- 2 Blockchain & Decentralized Identity Training
- 54 Cloud & Containers Training
- 7 Cybersecurity Training
- 5 DevOps & Site-Reliability Training
- 3 Linux Kernel Development Training
- 3 Networking Training
- 2 Open Source Best Practice Training
- 12 System Administration Training
- 1 System Engineering Training
- 6 Web & Application Development Training
- 799 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 97 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 776 Linux Distributions
- 83 Debian
- 68 Fedora
- 25 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 32 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 474 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 104 Linux Security
- 79 Network Management
- 102 System Management
- 47 Web Management
- 194 Mobile Computing
- 32 Android
- 146 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 409 Off Topic
- 129 Introductions
- 36 Study Material
- 1.1K Programming and Development
- 312 Kernel Development
- 739 Software Development
- 1K Software
- 421 Applications
- 183 Command Line
- 5 Compiling/Installing
- 71 Games
- 320 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
