Re: Port redirection not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric, thank you very much for your help! It's now working!

Cheers.

On Thursday 24 January 2008 16:32:45 Eric Leblond wrote:
> Hi,
>
> Le jeudi 24 janvier 2008 à 16:04 +0100, Gustavo Narea a écrit :
> > Hello, Eric.
> >
> > On Thursday 24 January 2008 14:49:54 Eric Leblond wrote:
> > > > I'm using this line in the attached file:
> > > > -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
> > >
> > > Miss "-t nat" in the line, you need to specify the table to use.
> >
> > I've changed that line as you suggested, but now I get this error when
> > running `iptables-restore < /etc/iptables.config':
>
> Hmm sorry, I miss the iptables-restore way to add the rules.
>
> iptables-restore format is not done to be hand edited (although this is
> possible).
>
> In fact, best thing to do is to :
>       * restore a working file
>       * add the NAT rules : iptables -t nat A PREROUTING -p tcp -m tcp
>         --dport 80 -j REDIRECT --to-ports 8080
>       * iptables-save>/etc/iptables.config
>
> Your error was to add the REDIRECT rules in the filter table.
>
> > ==========
> > iptables-restore v1.3.6: Line 7 seems to have a -t table option.
> >
> > Error occurred at line: 7
> > Try `iptables-restore -h' or 'iptables-restore --help' for more
> > information. ==========
> >
> > It now reads:
> > -A PREROUTING -t nat -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
> >
> > Thanks!



-- 
Gustavo Narea.
http://gustavonarea.net/

Get GNU/Linux! http://www.getgnulinux.org/

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux