Re: [CentOS] OT - IP Tables - forwarding to localhost - WORKS!!

2007-06-18 Thread first last
--- Luciano Rocha <[EMAIL PROTECTED]> wrote: > On Mon, Jun 18, 2007 at 11:46:42AM +0100, first last wrote: > > Hi, > > > > I am trying to set up a firewall rule so calls to old_mailserver:25 > get > > redirected to localhost:25. I have seen quite a few rules and none > seem > > to work. > > > >

Re: [CentOS] OT - IP Tables - forwarding to localhost

2007-06-18 Thread <[EMAIL PROTECTED]>
Igor Demjanenko napsal(a): > Hi, > > Try this: > > iptables -t nat -A PREROUTING -p tcp -d old_mailserver_ip > --destination-port 25 -j DNAT --to-destination 127.0.0.1:25 > Try: iptables -t nat -A PREROUTING -p tcp -d old_mailserver_ip --destination-port 25 -j DNAT --to-destination 127.0.0.1 P

Re: [CentOS] OT - IP Tables - forwarding to localhost

2007-06-18 Thread Luciano Rocha
On Mon, Jun 18, 2007 at 11:46:42AM +0100, first last wrote: > Hi, > > I am trying to set up a firewall rule so calls to old_mailserver:25 get > redirected to localhost:25. I have seen quite a few rules and none seem > to work. > > I have tried with the firewall enabled (configured to allow smtp)

Re: [CentOS] OT - IP Tables - forwarding to localhost

2007-06-18 Thread first last
Thanks for the response but it didn't work. It just hangs there trying to connect and then I get an error "no route to host" (as it should if trying to connect to that host directly. --- Igor Demjanenko <[EMAIL PROTECTED]> wrote: > Hi, > > Try this: > > iptables -t nat -A PREROUTING -p tcp -d o

Re: [CentOS] OT - IP Tables - forwarding to localhost

2007-06-18 Thread Igor Demjanenko
Hi, Try this: iptables -t nat -A PREROUTING -p tcp -d old_mailserver_ip --destination-port 25 -j DNAT --to-destination 127.0.0.1:25 first last wrote: Hi, I am trying to set up a firewall rule so calls to old_mailserver:25 get redirected to localhost:25. I have seen quite a few rules and non

[CentOS] OT - IP Tables - forwarding to localhost

2007-06-18 Thread first last
Hi, I am trying to set up a firewall rule so calls to old_mailserver:25 get redirected to localhost:25. I have seen quite a few rules and none seem to work. I have tried with the firewall enabled (configured to allow smtp) and disabled, but it doesn't seem to make a difference. One of the comman