A firewall, located at a network's perimeter, either between the network and the Internet or between the servers' segment and the rest of the network, can very easily control many of the servers' network ports.
Such a scheme would result in the following advantages and disadvantages:
Firewall's /etc/ipnat.conf includes:
1
rdr ep1 192.168.0.1/32 port 25 -> 192.168.0.254 port 10025
Firewall's /etc/rc.local includes:
1
/usr/local/bin/smtpwrap &
Firewall's /usr/local/bin/smtpwrap:
1
#!/usr/bin/perl
use ProtoWrap::SMTP;
use strict;
my ($wrap);
$wrap = ProtoWrap::SMTP->new('standalone' => 1,
'listenPort' => 10025,
'destType' => 'ip',
'destAddr' => '192.168.0.1',
'logLevel' => 3,
'maxMsgSize' => 3000000,
'relayDomainList' => ['mydomain.com'],
'maxRcpt' => 10,
'setUidTo' => 32767
);
die 'Can\'t start SMTP wrapper' if (not defined $wrap);
$wrap->startServer() or warn 'Can\'t start wrapper for '.$wrap->getProp();