Redirecting internal tcp connections

marcus marcus at
Fri Apr 15 19:12:59 CEST 2005

Hi, I have a lpd server on a remote host that ISP blocks port 515. I try 
to use something like "lpr -Plp at" but lprng doenst 
seems to recognize the port argument. So, I think to use iptables to 
redirect TCP requests on port 515 to port 900 but I dont know how. I've 
tried the following:

#iptables -A OUTPUT -p tcp --dport 515 -j REDIRECT --to-port 900

This gives me a "iptables: Invalid argument"

Any ideas?

More information about the netfilter mailing list