LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Lowering source ports (https://www.linuxquestions.org/questions/linux-networking-3/lowering-source-ports-636243/)

orvaquim 04-18-2008 09:42 AM

Lowering source ports
 
I have one big problem caused by my ISP strange minds.

They told me that they block any connection originating from their clients that is above 5000. My mailserver based on Ubuntu/Debian uses ports above 20000 much of the time when they start a connection.

Is there any how to lower the origin port in Linux using kernel 2.6? Please guys help me.

Any way many thanks in advance
Caveman

acid_kewpie 04-19-2008 04:51 AM

Are you really sure that's what they mean? sounds like a *very* strange policy if it is, but if that is the case then it is possible to adjust the ephemeral port range. you can tune this in /etc/sysctl.conf with the net.ipv4.ip_local_port_range parameter, but to be honest i think that's a 2.4 kernel thing, so might have changed in 2.6 but it is unlikely.

you might like to try experimenting with a tool like lft (layer four trace) which will let you do a traceroute like test but with tcp traffic and let you specify your own source port in the process to see how things actually are working out. alternatively nmap will let you provide a source port to connect to say google.com on port 80 as the server

orvaquim 04-19-2008 09:24 AM

Quote:

Originally Posted by acid_kewpie (Post 3126028)
Are you really sure that's what they mean? sounds like a *very* strange policy if it is, but if that is the case then it is possible to adjust the ephemeral port range. you can tune this in /etc/sysctl.conf with the net.ipv4.ip_local_port_range parameter, but to be honest i think that's a 2.4 kernel thing, so might have changed in 2.6 but it is unlikely.

you might like to try experimenting with a tool like lft (layer four trace) which will let you do a traceroute like test but with tcp traffic and let you specify your own source port in the process to see how things actually are working out. alternatively nmap will let you provide a source port to connect to say google.com on port 80 as the server

Yes I am sure. These people here sometimes have strange policies.

Thanks for you reply I will try it now.

Caveman

orvaquim 04-19-2008 04:35 PM

Yes it works!

Thanks


All times are GMT -5. The time now is 08:41 PM.