Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to restrict through IPTABLES , any mail attachment packet .
Local users when sending outlook mail with attachment . I want to restrict the mail attachment will discarded through linux iptables firewall system .
The mail is situated in remote and don't have any access on it . Can I block attachment packet in my end .
Yes . Because I don't have any access on remote mail server . But I have to set the restriction in such a way , so that local users can not send any attachment mail through outlook .
Is there any way .
There seem to be a few methods mentioned around the place - do a search for postfix block attachment.
Here's one suggestion
Quote:
man header_checks, man regexp_table
Put something like the following in /etc/postfix/mime_header_checks.regexp
/filename=\"?(.*)\.(bat|chm|cmd|com|do|exe|hta|jse|rm|scr|pif|vbe|vbs|vxd|xl)\"?$/
REJECT For security reasons we reject attachments of this type
/^\s*Content-(Disposition|Type).*name\s*=\s*"?(.+\.(lnk|asd|hlp|ocx|reg|bat|c[ho]m|cmd|exe|dll|vxd|pif|scr|h ta|jse?|sh[mbs]|vb[esx]|ws[fh]|wav|mov|wmf|xl))"?\s*$/
REJECT Attachment type not allowed. File "$2" has the unacceptable extension "$3"
Thanks for suggestion . But , those paramiter can be set in postfix mail configuration file . And I don't have access in mail server . Then please suggest how to overcome .
Thanks for suggestion . But , those paramiter can be set in postfix mail configuration file . And I don't have access in mail server . Then please suggest how to overcome .
About the only thing you could do is setup an internal mail server (with attachment blocking) and have the clients setup to authenticate and do email through there and then setup iptabes to deny all hosts except the internal mail server access to the outside world on port 25. Think smart host.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.