I have a cable modem on a different subnet (10.1.10.x).
I've enabled 1:1 NAT on the modem to map to 2 IPs:
>>> 99.99.99.90 goes to 10.1.10.2 (eth1 - red)
>>> 99.99.99.99 goes to 10.1.10.10 (eth1:0 - red alias)
All devices goes to a switch which then goes to my router/firewall's 192.168.1.1 (eth0 - green)
I have an Exchange server (192.168.1.254) which I want to give an exclusive external address (99.99.99.99) while the rest of my network is seen as (99.99.99.90). How do I accomplish this via IPtables? Right now all I have is this rule:
#!/bin/sh
# Used for private firewall rules
# 1:1 NAT
/sbin/iptables -t nat -A POSTROUTING -s 192.168.1.254 -j SNAT to-source 10.1.10.2
# See how we were called.
case "$1" in
start)
## add your 'start' rules here
;;
stop)
## add your 'stop' rules here
;;
reload)
$0 stop
$0 start
## add your 'reload' rules here
;;
*)
echo "Usage: $0 {start|stop|reload}"
;;
esac
Thanks.