Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There is this server where in I want to use port redirection using iptables. For port redirection I have used nat table with PREROUTING chain and REDIRECT option.
Like:
There is this server where in I want to use port redirection using iptables. For port redirection I have used nat table with PREROUTING chain and REDIRECT option.
Like:
Yes, I am allowing all the ports that I need. The incoming ports and the ports to which I need to redirect, are open and accepting the connections.
I am not exactly a newbie so I do not need a spoon fed solution, just direction where I should be looking. I am out of my wits now. I can not see anything.
Yes, I am allowing all the ports that I need. The incoming ports and the ports to which I need to redirect, are open and accepting the connections.
I am not exactly a newbie so I do not need a spoon fed solution, just direction where I should be looking. I am out of my wits now. I can not see anything.
worked fine when i tested...
Only solution now then is to create a chain for anything that isnt allowed to be dropped, and then see what, if anything is being added to this log when you attempt connections
I am now putting up a test machine with similar packages but running Ubuntu server rather than CentOS5.5. Most of the packages that are not default would be installed with apt. That might help a bit. I do not know.
I also have asked one of my friends to make a test scenario at his office and see if he also has issues with port redirection. Will receive some inputs from him as well. Till then I am putting my hope behind my new machine. Will keep you posted.
Thanks for looking and trying. I know this is just a small uncomplicated rule that should not have given too much trouble. But it seems CentOS5 is behaving like this.
I am now putting up a test machine with similar packages but running Ubuntu server rather than CentOS5.5. Most of the packages that are not default would be installed with apt. That might help a bit. I do not know.
I also have asked one of my friends to make a test scenario at his office and see if he also has issues with port redirection. Will receive some inputs from him as well. Till then I am putting my hope behind my new machine. Will keep you posted.
Thanks for looking and trying. I know this is just a small uncomplicated rule that should not have given too much trouble. But it seems CentOS5 is behaving like this.
Hmm..ok.
I tested on centos.
what i did.
10.220.241.18 is the source ip. (windows)
10.220.241.237 is the destination (centos 5.3)
Sorry for being late. Was on holiday for friend's wedding.
I can see that the ports are listening and can telnet. I am still not sure why this is not working.
Let me see.
And if nothing works, then I will probably put some ebox appliance or something.
Will keep you posted about it. Todays the first day at office after holiday. Will need some time.
Thanks for taking interest anyhow.
chaitanya@IBDesk06:~$ telnet 192.168.2.1 8110
Trying 192.168.2.1...
Connected to 192.168.2.1.
Escape character is '^]'.
Connection closed by foreign host.
chaitanya@IBDesk06:~$ telnet 192.168.2.1 8110
Trying 192.168.2.1...
Connected to 192.168.2.1.
Escape character is '^]'.
Connection closed by foreign host.
i meant from this same machine
Code:
[root@squid etc]#
best to do all testing from the same machine....
is there anything showing up in the drop logs - (assuming you have set up logging with iptables) when an attempt to port redirect fails?
It is accepting connections even on the same machine. I am trying this on a test machine. So it will take some time before I can do that. Will keep you posted.
Well let me give some more information that I forgot till now. This machine that I am trying port forwarding is behind a ADSL modem and D-Link wireless router.
So you could take it as:
Code:
Adsl modem ---> Wireless router -----> my system ------>lan
The wireless router does have some ethernet ports for wires connection and can act as a hub.
If this information makes difference. Though it should not. I have tried connecting directly to the adsl modem.
Last edited by linuxlover.chaitanya; 06-28-2010 at 01:00 AM.
Reason: typo
Well let me give some more information that I forgot till now. This machine that I am trying port forwarding is behind a ADSL modem and D-Link wireless router.
So you could take it as:
Code:
Adsl modem ---> Wireless router -----> my system ------>lan
The wireless router does have some ethernet ports for wires connection and can act as a hub.
If this information makes difference. Though it should not. I have tried connecting directly to the adsl modem.
well i must admit...my testing was with 3 machines on my lan, 2 running centos 5.3 and 1 with windows.
i guess a process of elimination determines if it is any devices in the network causing the issue or iptables itself (which i doubt)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.