Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iptables redirect
#1

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

Reply
#2

/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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)