Re: block 8080, but redirect from 80 to 8080

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

 



Gáspár Lajos a écrit :

Quick and dirty :
Drop the undesired packets in the PREROUTING chain of the 'mangle' table, before REDIRECT occurs.

iptables -t mangle -A PREROUTING -p tcp --dport 8080 -j DROP (or REJECT)

I would recomment NOT TO DO any ACCEPT or DROP/REJECT in other than the
filter table...

I agree, that's why I mentionned "quick and _dirty_" and suggested a better solution based on marks. However I think ACCEPT is an acceptable target in any table, not only in 'filter'.

By the way, I made a mistake : REJECT is a valid target only in the 'filter' table, showing if necessary that the other tables are not intended for filtering.



[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