How to Open pop3 and smtp ports in iptables firewall

Source: Internet
Author: User
Iptable-AINPUT-ptcp-dIP -- dport25-jACCEPTiptable-AINPUT-ptcp-dIP -- dport110-jACCEPT1, how do I close all ports? IPTABLES-AINPUT-DPROT1-65535-JDROP2 in the specified port that needs to be opened? (For example: 22) IPTABLES-AINPUT

Iptable-a input-p TCP/IP -- dport 25-j ACCEPT
Iptable-a input-p TCP/IP -- dport 110-j ACCEPT

1. how do I close all ports?
IPTABLES-a input-d prot 1-65535-J DROP

2. when specifying the port to be opened? (For example, 22)
IPTABLES-a input-d prot! 22-J DROP

3. What is the difference between prot and FORWARD?
PROT is the port. FORWARD. Is the data packet type.

Disable SMTP or POP3 ports

What new do users add in outlook, such as giga and yahoo ?, Directly inIptablesWhat are the ip addresses of the specified isp? Enter your 「? You can do that.
Iptables-a input-p tcp-I eth0-s (giga ip) -- sport (25 or 110)-d (your eth0 IP)-j DROP
OR
Iptables-a forward-p tcp-I eth1-s (client user ip)-d (giga ip) -- dport (25 or 110)-j DROP

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.