Hello,
I have a server with dhcp, dns and a ppoe connection for internet were firewalld is running.
This server acts as a router for a switch (TL-SG3216 only layer2) where multiple PC and a printer are connected to 3 vlan (vlan2 for gamers, vlan3 for home and vlan4 for a printer)
Firewalld is used for internet access for the server and the different PC. This is working.
I can print from the server but not from the PC.
If I stop firewalld (systemctl stop firewalld) I can print from the PC but I loss the internet connection and the firewall protection.
Also with firewald running I cannot reach the printer web interface using the printer IP address (192.168.4.50) from the PC. It works from the server.
The server ethernet interface eno2 is connected to a trunk port of the switch.
tcpdump shows this error when firewalld is running
hpprol2:~ # tcpdump -i eno2 -n -s0 icmp -v
tcpdump: listening on eno2, link-type EN10MB (Ethernet), capture size 262144 bytes
22:21:10.044783 IP (tos 0xc0, ttl 64, id 442, offset 0, flags [none], proto ICMP (1), length 80)
192.168.30.1 > 192.168.30.100: ICMP host 192.168.4.50 unreachable - admin prohibited filter, length 60
IP (tos 0x0, ttl 63, id 62540, offset 0, flags [DF], proto TCP (6), length 52)
192.168.30.100.57613 > 192.168.4.50.80: Flags [S], cksum 0x8756 (correct), seq 3197479150, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
22:21:10.305078 IP (tos 0xc0, ttl 64, id 480, offset 0, flags [none], proto ICMP (1), length 80)
192.168.30.1 > 192.168.30.100: ICMP host 192.168.4.50 unreachable - admin prohibited filter, length 60
IP (tos 0x0, ttl 63, id 62541, offset 0, flags [DF], proto TCP (6), length 52)
192.168.30.100.57614 > 192.168.4.50.80: Flags [S], cksum 0x60a9 (correct), seq 3757157950, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
If I look at the content of nftables I have the feeling that there are some rules missing for icmp
hpprol2:~ # nft list ruleset
table inet firewalld {
......
chain filter_INPUT {
type filter hook input priority filter + 10; policy accept;
ct state { established, related } accept
ct status dnat accept
iifname "lo" accept
jump filter_INPUT_POLICIES_pre
jump filter_INPUT_ZONES
jump filter_INPUT_POLICIES_post
ct state { invalid } drop
reject with icmpx type admin-prohibited
}
chain filter_FORWARD {
type filter hook forward priority filter + 10; policy accept;
ct state { established, related } accept
ct status dnat accept
iifname "lo" accept
ip6 daddr { ::/96, ::ffff:0.0.0.0/96, 2002::/24, 2002:a00::/24, 2002:7f00::/24, 2002:a9fe::/32, 2002:ac10::/28, 2002:c0a8::/32, 2002:e000::/19 } reject with icmpv6 type addr-unreachable
jump filter_FORWARD_POLICIES_pre
jump filter_FORWARD_IN_ZONES
jump filter_FORWARD_OUT_ZONES
jump filter_FORWARD_POLICIES_post
ct state { invalid } drop
reject with icmpx type admin-prohibited
}
......
I think that I need direct rules allowing no rejection of icmp between the vlan but which?
Many thanks in advance
Philippe