Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 80 interface VLan1 80
access-list 105 permit tcp any host 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
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


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.