Find the answer to your Linux question:
Results 1 to 5 of 5
this my network : i can not access centos from remote via port 2222 i forward 2222 to centos IP (192.168.1.250) from modem and i have changed default port to ...
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    27

    remote access via SSH from 2222 ?

    this my network :




    i can not access centos from remote via port 2222

    i forward 2222 to centos IP (192.168.1.250) from modem
    and
    i have changed default port to 2222 from sshd_config
    and
    i accept all tcp request from port 2222

    Code:
    iptables -A INPUT -p tcp --dport 2222 -j ACCEPT
    but still i can not

    what will i do for firewall or other ? what is problem for you ?

  2. #2
    Linux Enthusiast Bemk's Avatar
    Join Date
    Sep 2008
    Location
    Oosterhout-NB, Netherlands
    Posts
    522
    As I see it in the diagram you are trying to access the system from outside the network, which would require you to forward in the router, have you done that? If not make sure your forwarded box gets a static IP so you don't have to change the settings in the router, each time the dhcp release runs out.

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    35
    try to disable the Selinux .
    and nmap the pc from other machine
    nmap ssh-host (should give you of the port is open or not)

  4. #4
    Just Joined!
    Join Date
    Jan 2007
    Posts
    27
    Quote Originally Posted by Bemk View Post
    As I see it in the diagram you are trying to access the system from outside the network, which would require you to forward in the router, have you done that? If not make sure your forwarded box gets a static IP so you don't have to change the settings in the router, each time the dhcp release runs out.
    1- i have static IP
    2- İ forwarded in router

    Quote Originally Posted by Fantaman View Post
    try to disable the Selinux .
    and nmap the pc from other machine
    nmap ssh-host (should give you of the port is open or not)
    fromwhere can i disable selinux and nmap ?

  5. #5
    Just Joined!
    Join Date
    Nov 2006
    Posts
    6
    This may seem silly to ask, but did you restart the sshd service after configuration?

    The first thing I would try is to turn off iptables (service iptables stop) and try ssh. If it works then you have something wrong with iptables. I'd also make sure you aren't using tcp_wrappers (/etc/hosts.allow and /etc/hosts.deny).

    I would not turn off SELinux, but you can set it to Permissive mode with
    Code:
    setenforce Permissive
    Then you can enforce SELinux again with
    Code:
    setenforce Enforcing
    Sorry, but I've never heard about disabling NMAP so I can't help there.

    I hope I was some help.
    Michael Cunningham

Posting Permissions

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