LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-30-2007, 11:22 AM   #1
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
Unhappy How to change ports?


Hai ,

I am new to linux. Shall any one tell me how to know what are the ports available for connection in my system. I know there is netstat, but i dont know how to use it.
Further how can i change the port??? for example if want to change the port from 25 to 25025, and 3389 to 62000.I have no idea on those.
Will you suggest some fine documents regarding ports checking and changing.


Thanks in advance.
 
Old 03-30-2007, 11:58 AM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
What do you want to use the ports for? By default, all ports will be closed, unless there is some kind of service running on them. Changing the port for a specific service depends on the configuration of that service. For example, if you want to run sshd on a different port, you need to modify /etc/ssh/sshd_config.
 
Old 03-30-2007, 04:40 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
are you asking how to change your ephemeral port range??

if so, the way to do it is with the /proc/sys/net/ipv4/ip_local_port_range file... here's what mine looks like, for example:
Code:
win32sux@candystore:~$ cat /proc/sys/net/ipv4/ip_local_port_range
32768   61000
to change it just echo the new range into the file, like:
Code:
echo "3389 62000" > /proc/sys/net/ipv4/ip_local_port_range
or make the appropriate adjustment to your /etc/sysctl.conf file...

Last edited by win32sux; 03-30-2007 at 04:52 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB over-current change killing USB ports Fluxxdog Linux - Hardware 4 09-13-2008 06:09 AM
are outbound ports converged while local ports are ok ? inanc Linux - Networking 0 02-06-2007 10:37 AM
how do i change my default bit-torrent ports jasonmcneil0 Linux - Software 0 08-17-2004 08:13 PM
how do i change ports for ftp server Kertais909 Linux - Networking 3 07-21-2004 04:18 AM
Change UID of process/Privileged ports syntac Linux - General 1 04-17-2003 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration