Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have centOS mail & web servers configured in a computer in LAN.

My cisco router carries a external IP needs translation so that any request to my global IP at http port will be forwarded to my LAN's centOS carrying terminal.

So I did that with the following command.

ip nat inside source static tcp 192.168.1.422 80 interface VLan1 80
access-list 105 permit tcp any host 260.97.42.742 eq 80
access-list 105 permit tcp any any established
access-list 105 permit udp any eq domain 

In the same way I want to send email through port 25 from my centOS.

Now I want to forward from INSIDE TO OUTSIDE, centos to router. (Opposite to HTTP in which request to the router is forwarded to my centos host.)

So, what is the right command to create a NAT port forwarding so that I can send emails from my host machine through router ?

Thanks in advance

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Unless your Cisco router blocks outgoing traffic, you don't need any NAT from CentOS to Router.

If you need to receive mail to yor server, you'll need to forward port 25 the same way you forward port 80.

Instead, if you need just to connect from CentOS to remote mailservers, simply make sure you don't block traffic or add an access list to the WAN interface to permit traffic to port 25 from CentOS IP address.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.