Find the answer to your Linux question:
Results 1 to 2 of 2
If I just boot up my (Fedora 12) computer I can access it through terminal ssh/ftp reliably from my OS X machine. But after some undetermined amount of time (usually ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    1

    ssh shuts down eventually

    If I just boot up my (Fedora 12) computer I can access it through terminal ssh/ftp reliably from my OS X machine. But after some undetermined amount of time (usually 'over night') if I try to ssh in or get ftp access I can't. it just times out and ping says "no route to host"/"host is down" if I reboot it solves the problem instantly. I set up iptables to have port the FTP ports open, I think it's right (I mean it works until I got to sleep or go away for a few hours )

    (here's my iptables ...if it is relevant..who knows)
    Code:
    Table: nat
    Chain PREROUTING (policy ACCEPT)
    num  target     prot opt source               destination         
    
    Chain POSTROUTING (policy ACCEPT)
    num  target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    num  target     prot opt source               destination         
    
    Table: filter
    Chain INPUT (policy ACCEPT)
    num  target     prot opt source               destination         
    1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW multiport ports 20:21 
    2    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    3    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
    4    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
    5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
    6    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
    7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21 
    
    Chain FORWARD (policy ACCEPT)
    num  target     prot opt source               destination         
    1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
    
    Chain OUTPUT (policy ACCEPT)
    num  target     prot opt source               destination
    What gives?

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Quote Originally Posted by Ostrolphant View Post
    If I just boot up my (Fedora 12) computer I can access it through terminal ssh/ftp reliably from my OS X machine. But after some undetermined amount of time (usually 'over night') if I try to ssh in or get ftp access I can't. it just times out and ping says "no route to host"/"host is down" if I reboot it solves the problem instantly.
    Sounds like you are losing your Network connection on the Fedora box. Have you checked anything before you reboot? Logs? Interfaces? Tried to ping anything from the Fedora box?

    I set up iptables to have port the FTP ports open, I think it's right (I mean it works until I got to sleep or go away for a few hours )

    (here's my iptables ...if it is relevant..who knows)
    Code:
    Table: nat
    Chain PREROUTING (policy ACCEPT)
    num  target     prot opt source               destination         
    
    Chain POSTROUTING (policy ACCEPT)
    num  target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    num  target     prot opt source               destination         
    
    Table: filter
    Chain INPUT (policy ACCEPT)
    num  target     prot opt source               destination         
    1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW multiport ports 20:21 
    2    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    3    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
    4    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
    5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
    6    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
    7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21 
    
    Chain FORWARD (policy ACCEPT)
    num  target     prot opt source               destination         
    1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
    
    Chain OUTPUT (policy ACCEPT)
    num  target     prot opt source               destination
    What gives?
    I am surprised that port 21 is able to connect at all since it is after the REJECT rule.
    Don't you know that POLICIES should be set to DROP?
    Post your /etc/sysconfig/iptables file.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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