Next, we have client.sh, which is used to provision the 'client' VM: The first is util.sh, where we will put some common functions that are used on most VMs: This Vagrantfile depends on a few other files. The ‘server’ VM represents the receiving mail server, somewhere outside the customer network. The ‘client’ VM represents a mail client inside the customer network, it will send email to the Internet. The Vagrantfile configures two virtual machines, named ‘client’ and ‘server’. Node.vm.provision "shell", path: "server.sh" end end Node.vm.provision "file", source: "rvice", destination: "/tmp/rvice" Node.vm.provision "shell", path: "client.sh" end Node.vm.provision "file", source: "util.sh", destination: "/tmp/util.sh" We can describe these two machines in a Vagrantfile with the following contents: The first thing we need to do is set up the client and server virtual machines. All of our VMs are going to be based on Ubuntu 18.04, but it should be straightforward to modify this procedure to work with any Linux distribution. For this blog post, we're going to use Vagrant to manage the virtual machines. Fortunately, it's possible to set up a complete transparent filtering environment that can run on a single host, using virtual machines. Deploying into an environment with policy-based routing enabled is not always practical during development, it's much easier to let each developer have their own separate environment. Here at MailChannels, we frequently have to develop and test new features for use with transparent filtering. When Traffic Control is in transparent mode, the client and server appear to be connected directly to each other, even though the connection is being proxied. Traffic Control makes a connection to 10.0.0.1, and the connection appears to be from 192.168.0.1. The initial connection request is diverted to Traffic Control using policy-based routing. For example, suppose the SMTP client is at 192.168.0.1, and it tries to send mail to 10.0.0.1. When it makes this downstream connection, it binds to the IP address of the original SMTP client. Once it accepts the connection, Traffic Control connects to the SMTP server that the upstream client was connecting to before policy-based routing was applied. In transparent mode, Traffic Control accepts connections on port 25 for any IP address, even IP addresses that are not associated with the Traffic Control host. To support this configuration, Traffic Control needs to be run in "transparent" mode. In addition, all the return packets, headed into the network, with a source port of 25, need to be routed to Traffic Control. For outbound SMTP filtering, routers should be configured to route all packets heading out of the network, with a destination port of 25, to the Traffic Control host. Policy-based routing allows the network operator to redirect traffic based on the TCP connection properties. In this case, the best way to implement outbound filtering may be to use policy-based routing. It is usually impractical for them to reconfigure every SMTP client. For example, some Internet service providers allow their clients to send mail directly to the Internet. In some cases, a network operator may not be able to mandate configuration changes to all SMTP clients on their network. In that case, the client can be configured to use the Traffic Control host as a 'smart host', and to direct all SMTP connections through it. The setup pictured above is straightforward to implement, if the network operator has control of the SMTP client configuration. Now Traffic Control can inspect the message and take appropriate action, for example by blocking a spam message. When the client sends a message to the server, the connection is redirected to the Traffic Control host. That means it is positioned in between the SMTP client (the host that is sending the message), and the SMTP server. MailChannels Traffic Control is an SMTP proxy. This blog post is not going to cover why outbound filtering is important, but you can find more detail in our white paper here. Outbound filtering protects the reputation of the sending network, making it more likely for legitimate messages to be delivered. It is also becoming more common for network operators to deploy outbound SMTP filtering. Filtering software is often deployed that intercepts inbound SMTP connections, and prevents unwanted emails from reaching your inbox. All of the emails you receive are transmitted using SMTP, including all of the spam. SMTP (Simple Mail Transfer Protocol) is the protocol used to send email on the Internet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |