I want to put a multi-function printer in a zone blocked from accessing WAN. But I need to exclusively allow its address to send email via smtp (port 25). to achieve its "Scan-to-Email" function. Therefore, I added a Traffic Rule in UI (Luci) to accept forwarding from its address to WAN, but it still cannot acces external email server. How can I solve it (in Luci)?
(Sorry I really cannot find solution for this simple question.)
Are you sure it is port 25? Most mail servers work on different ports these days with more security.
I'd recommend that you start by allowing the printer to access the internet in general so that you can verify the mail server settings without any restrictions. This will be a traffic rule that will be set to accept TCP from source < IP address of printer > to destination zone WAN.
Configure your printer and get everything working. When it is working, you can close that down by simply putting a destination port in the rule above.
Yes, the device has DHCP enabled. The device work properly under an unblocked zone. But now I want to move it into a blocked zone, for overall better security, but specifying a traffic rule for allowing it to send via smtp exclusively. It rule is put in the topest position under Traffic Rules Tab of Luci.
Do you allow DHCP in the blocked zone (so the device gets an IP address)?
If so, perhaps you should show us your /etc/config/firewall (or screenshot) and network config to better understand how you set up the zone/firewall/network/etc..
Ok... so, you need to know the IP address of the printer. If the printer uses DHCP, be sure to set a DHCP reservation so that it always gets the same IP address on the network.
Verify the port setting per the configuration within the printer. If everything is already configured and working on that printer, use that port number to create the rule as I described.
You can show a screenshot of your rule if you want verification.
As I said, the device worked properly under an unblocked zone (vlan_boxed), using my ISP's email server via Port 25. I have "just" tried tomove it into another zone (vlan_devout). All configurations are the same. The only difference is on zone level: vlan_boxed zone allow forwarding to WAN which vlan_devout doesn't allow. I want to use Traffic rule to overwrite it for my printer, if feasible.
Ok... so you can follow the advice I gave before to create your firewall rule allowing the device to connect to the internet. As I said earlier, I'd recommend allowing it full access (allow all ports) to verify the rule is functioning, then restrict it to only allow port 25 (assuming you are absolutely positive that port 25 is the correct port).
Please provide a screenshot of your printer's outbound email configuration page. (be sure to redact any personally identifiable information).
Verify that the address you have (192.168.22.100) is indeed the printer's IP (you can check this when you are grabbing the screenshot above).
then ssh into your router and provide us with the following two files:
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
Yes, but it is easier to keep track of things and reduce the likelihood of errors if there is only a single relevant rule.
Please remove the destination port from the firewall rule and test the printer. I do not expect that this will solve the problem, but it makes sense to fully open the printer to the internet to verify that this is true.
I have just tried to further remove the destination port as you indicated, the printer can now 'scan-to-email' again, just like what it could do when I put it into Vlan_Boxed (zone forward-able with WAN) before. So what's next?