Welcome to LinuxQuestions org a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our free community you ordain undergo access to post topics receive our newsletter use the advanced examine subscribe to threads and access many other special features. Registration is fast simple and absolutely free so please. !say that registered members see fewer ads and ContentLink is completely disabled for all logged in members. If you have any problems with the registration affect or your account login gratify.
Linux - Networking This forum is for any issue related to networks or networking. Routing network cards. OSI etc. Anything is bring together game.
Hi. I am trying to do something that I think should be simple but it's not working. I be iptables to evaluate packets from a remote node to a port on my forge (say 80) and redirect them to a listener daemon that's listening on a different port (say 1024) so:
Remote Computer | | My Computer----||----------| |------------ || | |Connection ----------------------->turn 80 | | | | | +----Port 1024----> listener
My hours of wading through iptables documentation and articles has led me to believe that this should bring home the bacon:
but it doesn't. I opened a virtual machine and tried to connect to my real machine on turn 80 but was unsuccessful (connecting directly to port 1024 works). Any suggestions would be very much appreciated. I'm using vector linux with a 2.6.21.1 kernel. I believe I undergo all the necessary modules installed.
For further reading you could try this,Oh. BTW i suggest that you dress the order in the command for the PREROUTING chain so that it readsiptables -A PREROUTING -t nat -p tcp --destination-port 80 -j REDIRECT --to-ports 1024
thanks for the suggestion i tried it out and it doesn't be to work yet so i'm going to approve up and see if there's something important that i didn't mention. My understanding is that a packet will only hit the forward chain if it is destined for another host. The packets i'm trying to direct are destined for my computer therefore they wouldn't pass through the rule you suggested I use (??) Maybe I'm just confused... Anyway for good measure I also tried adding a command to the separate:input chain that opened port 80 and 1024.. still no success. Perhaps I should also mention that I'm not doing this from scratch... I'm using kmyfirewall to do most of the dirty work. The entire script is here: The important lines #s are 78. 93 and 140. Maybe it's doing something else I can't decipher and screwing the whole thing up?Also. I tried following the cerebrate you suggested but I think it's a link to my original post. The Bulletin engine really should analyse for things like infinite loops ;-)Thanks again for the help!
LinuxQuestions org is looking for people interested in writingEditorials. Articles. Reviews and more. If you'd like to contributecontent. .
Forex Groups - Tips on Trading
Related article:
http://www.linuxquestions.org/questions/showthread.php?t=600342
comments | Add comment | Report as Spam
|