|
I have a Linux box I use for a firewall with iptables, and I need to put my mail server on the right ip address for proper reverse DNS Lookup.
So I can take inbound packets and NAT them to the mail server, but I need to take outbound packets from the mail server, and send them on a different IP address. The IPTables sends everything out on the same IP, which is 1, but I need 5.
I thinking maybe I could add another gateway, using route, below is my main route, I'd like to add 192.168.3.5 to use a gateway of 69.199.126.198,
Am I on the right track here?, I could use some help on this
/sbin/route add default gw 69.199.126.193 dev eth0
/sbin/route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1 dev eth1
|
|
|
|
|
I had 2 addresses bound to the mail server adapter, and was only SNAT 1 of them, so I added a SNAT to the other address, and now the mail server responds on the correct ip address for reverse dns and resolves correctly.
So I didn't need a 2nd gateway address, or need to add any additional routing, turned out to be pretty easy. Only took me years to figure out.
modified 9-Oct-12 23:36pm.
|
|
|
|
|
try to copy the first ip to your pc and try again should be solved
|
|
|
|
|
I want to take all new smtp packets generated inside the network, and send them out on a different ip address, and not the gateway address, so the ipaddress reverses back to the correct ptr record, indicating it's a mail a server that belongs to my domain.
Right now, the packets go out on the gateway, with a different reverse ptr record.
|
|
|
|