Stuck with the error Shorewall forward reject? We can help you.
Shorewall is a firewall tool that makes the task of network security easier. However, the error is the result of rejecting the connection request.
As part of our Server Management Services, we assist our customers with several Shorewall errors.
Today, let’s get into the details on how our Support Engineers fix the error, Shorewall forward reject.
Why Shorewall forward reject?
We use Shorewall as a firewall for security purposes. The rules added in the Shorewall will reject access from unwanted IP addresses.
All the rules are present in the following configuration file.
Rules in this file govern connection establishment. It allows requests and responses automatically using connection tracking.
For instance, the error appears as:
The rejected/dropped packets logged out of the INPUT or FORWARD chains indicate the following.
- Users zone definitions screw up and the host sending the packets or the destination host isn’t in any zone.
- The source and destination hosts are both connected to the same interface and user don’t have a policy or rule for the source zone to or from the destination zone or user haven’t set the route back option for the interface in
- Two firewall interfaces connect (from different zones) to the same hub or switch.
Moving ahead, let’s see how our Support Engineers fix this error.
How can we resolve this problem?
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face the error, Shorewall forward reject.
Now, let’s see how our Support Engineers fix it.
Recently, one of the customers approached us with SHOREWALL:FORWARD:REJECT error log from the users /var/log/messages file. The customer was unable to access google.com from his LAN.
While checking Shorewall configuration files, we could trace that the entry ‘all all REJECT info’ in the cat /etc/shorewall/policy Shorewall configuration is the cause of the problem.
cat /etc/shorewall/policy $FW all ACCEPT loc $FW ACCEPT all all REJECT info
Thereafter, in order to resolve the issue, we add the following line in the cat /etc/shorewall/policy.
loc net ACCEPT
It indicates that it opens all ports to outside for LAN and so the connection had established.
Similarly, another user came to us with the following error message.
Jun 27 15:37:56 gateway kernel: Shorewall:all2all:REJECT:IN=eth2 OUT=eth1 SRC=192.168.x.x DST=192.168.x.x LEN=67 TOS=0x00 PREC=0x00 TTL=63 ID=5805 DF PROTO=UDP SPT=1803 DPT=53 LEN=47
On further checking this problem, we traced that 192.168.x.x was in the “dmz” zone and 192.168.x.x is in the “loc” zone. The rule was missing in the configuration file, so we added the following.
Finally, the error had resolved.
[Failed to resolve the error? We’ll fix it for you.]
In short, the ‘Shorewall forward reject’ error mainly occurs when there is any misconfiguration or missing in the rules added to the Shorewall configuration files. Today, we saw how our Support Engineers helped the customers in fixing this problem.