Jump to content
Sign in to follow this  
Guest questorX

iptables redirect

Recommended Posts

Guest questorX

A local ISP blocks port 25 so mail users cannot use my smtp server. I need to redirect port 2525 to 25 so my users can bypass this.

 

Ive done this on bsd servers but cant get it to stick with iptables on linux. I have use different variations but here is one of the commands i have tried:

 

iptables -t nat -A PREROUTING -i eth0 -p tcp -dport 2525 -j REDIRECT --to-port 25

 

any help would be most appreciated.

 

cool beans.

 

questorX

Share this post


Link to post
Share on other sites

/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2525 -j DNAT --to 192.168.0.10:25

 

this will forward all incoming tcp traffic on the eth0 interface to port 2525 over to internal machine 192.168.0.10 on port 25

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...