Find the answer to your Linux question:
Results 1 to 5 of 5
I have Fedora 14, and am trying to connect to my Fedora machine using a netbook that I have. For some reason, port 22 is closed on my computer. I ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    1

    Opening Ports in Fedora

    I have Fedora 14, and am trying to connect to my Fedora machine using a netbook that I have. For some reason, port 22 is closed on my computer. I know enough to realize this is required for SSH, and would like to open it. Does anyone know how to do this?

    (Also, my netbook has Ubuntu Netbook 10.10, just in case it makes any difference)

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Check and see if the firewall is running...
    Code:
    service iptables status
    Check to see if the SSH service is running...
    Code:
    servie sshd status
    If it is then you need to edit the firewall and add a rule to allow port 22 through

    Have a look at system-config-securitylevel

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    By default sshd may not be running on your system as said above check the status

    if it is off run

    Code:
    service sshd start
    If it is on you should check your IPTables Configuration. This can be done by disabling iptables temporarily with

    Code:
    service iptables stop
    if it is your IPTables Configuration you need to open the port using iptables

    Code:
    [root@fedora ~]# iptables -I INPUT -p tcp --dport 25 -j ACCEPT
    [root@fedora ~]# iptables save

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Quote Originally Posted by Affix View Post
    If it is on you should check your IPTables Configuration. This can be done by disabling iptables temporarily with
    Why the temporary stopping of the firewall? You think this is necessary? You can check your rules without shutting off the firewall.

    Some ways to check your firewall;

    Code:
    service iptables status
    or
    iptables -L
    if it is your IPTables Configuration you need to open the port using iptables

    Code:
    [root@fedora ~]# iptables -I INPUT -p tcp --dport 25 -j ACCEPT
    While I can understand your excitement at maybe being able to help someone, you should really have an understanding of what you are asking them to do. The default port for SSH is 22 not 25. This can also be changed by the users as long as they understand how and where to make the change.

    Here is a Port Listing for you to look over.

    Also you should start thinking about using a STATEFUL firewall that uses NEW, ESTABLISHED, RELATED and INVALID rules.
    See this TUTORIAL on this topic.

    Code:
    [root@fedora ~]# iptables save
    RH does not save the firewall rules like this unless they have recently changed something. You should use

    Code:
    service iptables save
    Which will store the current running firewall rules in /etc/sysconf/iptables.
    When the firewall is restarted with service iptables start/restart this file is read.

    A lot of people believe in running a script to start and configure their firewalls. I believe that you can use a script to configure the firewall at first then you should save and restore the rules using the system calls as designed.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    Quote Originally Posted by Lazydog View Post
    While I can understand your excitement at maybe being able to help someone, you should really have an understanding of what you are asking them to do. The default port for SSH is 22 not 25. This can also be changed by the users as long as they understand how and where to make the change.
    .
    Actually 25 Was a typo I know what most default ports are for the most common services

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...