I'm running FreeBSD 3.4, use ADSL connect to ISP,
I'm configuring NAT, and that all packets from internal network can travell
in and out through the BSD.
Even internal Exchange Server 5.5 can send and receive email, But I can not
read email from other external
computer. Therefore, I want to use the method of mapping ip address (Static
NAT).
But it seems not work , Anybody can help me?
Exchange Server ip: 192.168.128.20
Static external IP: 200.20.5.3
NIC rl0 IP:200.20.5.2
Method 1:
[natd.conf]
natd -redirect_address 192.168.128.20 200.20.5.3 -alias_address 200.20.5.2
Method 2:
[natd.conf]
natd -redirect_port tcp 192.168.128.20:110 200.20.5.3:110 -interface rl0
Still not work !!
[rc.conf]
ifconfig_fxp0="inet 192.168.128.12 netmask 255.255.255.0"
ifconfig_rl0="inet 200.20.5.2 netmask 255.255.255.248"
ifconfig_rl0_alias0="inet 200.20.5.3 netmask 255.255.255.248"
#
hostname="dns.abc.com.tw"
gateway_enable="YES"
defaultrouter="200.20.5.1"
#
sendmail_enable="NO"
#
# router_enable="YES"
firewall_enable="YES"
natd_enable="YES"
natd_interface="rl0"
[rc.firewall]
/sbin/ipfw -f flush
/sbin/ipfw add 60000 divert natd all from any to any via rl0
/sbin/ipfw add 61000 pass all from any to any