The connection was refused when attempting to contact the localhost

From: Rob (robert3c_at_mail.klur.com)
Date: 10/08/03

  • Next message: Andrew Schulman: "Re: Catch-22: DNS <=> Comcast registration"
    Date: 8 Oct 2003 10:53:39 -0700
    
    

    I cannot connect to my localhost.
    I tried localhost, localhost:80 and localhost:8080.
    My httpd.conf file is listen 192.1768.1.100:8080 which is the location
    of my linux server on a lan with two computers connected by a
    linksys 4 port befsr41 router v3
    using a static ip
    FTP 21 192.168.1.
    Telnet 23 192.168.1.
    SMTP 25 192.168.1.
    DNS 53 192.168.1.
    TFTP 69 192.168.1.
    finger 79 192.168.1.
    HTTP 80 192.168.1.100 enabled
    POP3 110 192.168.1.
    NNTP 119 192.168.1.
    SNMP 161 192.168.1.
    http 8080 192.168.1.100 enabled
    enabled local DHCP Server
    mtu disable
    administrator works on port 8081.
    My ISP blocks port 80.

    My localhost was working yesterday.
    I followed instructions to install mysql, php and apache from
    http://www.nitecon.com/downloads/rh9tut.htm

    Could a change in IP address cause the problem?
    My hosts in etc/ folder has the following entry.

    127.0.0.1 localhost.localdomain localhost

    These commands were done from my web server which never worked.
    iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    RH-Lokkit-0-50-INPUT all -- anywhere anywhere
     
    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    RH-Lokkit-0-50-INPUT all -- anywhere anywhere
     
    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
    Chain RH-Lokkit-0-50-INPUT (2 references)
    target prot opt source destination
    ACCEPT tcp -- myhostname myhostname tcp
    dpt:http flags:S
    YN,RST,ACK/SYN
    ACCEPT tcp -- myhostname myhostname tcp
    dpt:ftp flags:SY
    N,RST,ACK/SYN
    ACCEPT tcp -- myhostname myhostname tcp
    dpt:ssh flags:SY
    N,RST,ACK/SYN
    ACCEPT tcp -- myhostname myhostname tcp
    dpt:telnet flags
    :SYN,RST,ACK/SYN
    ACCEPT udp -- myhostname myhostname udp
    spts:bootps:boot
    pc dpts:bootps:bootpc
    ACCEPT udp -- myhostname myhostname udp
    spts:bootps:boot
    pc dpts:bootps:bootpc
    ACCEPT all -- myhostname myhostname
    REJECT tcp -- myhostname myhostname tcp
    dpts:0:1023 flag
    s:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
    REJECT tcp -- myhostname myhostname tcp
    dpt:nfs flags:SY
    N,RST,ACK/SYN reject-with icmp-port-unreachable
    REJECT udp -- myhostname myhostname udp
    dpts:0:1023 reje
    ct-with icmp-port-unreachable
    REJECT udp -- myhostname myhostname udp
    dpt:nfs reject-w
    ith icmp-port-unreachable
    REJECT tcp -- myhostname myhostname tcp
    dpts:x11:6009 fl
    ags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
    REJECT tcp -- myhostname myhostname tcp
    dpt:xfs flags:SY
    N,RST,ACK/SYN reject-with icmp-port-unreachable

     ifconfig
    eth0 Link encap:Ethernet HWaddr 00:04:5A:54:CB:84
              inet addr:192.168.1.100 Bcast:192.168.1.255
    Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
              RX packets:293 errors:0 dropped:0 overruns:0 frame:0
              TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:100
              RX bytes:260029 (253.9 Kb) TX bytes:33695 (32.9 Kb)
              Interrupt:5 Base address:0x8000
     
    lo Link encap:Local Loopback
              inet addr:127.0.0.1 Mask:255.0.0.0
              UP LOOPBACK RUNNING MTU:16436 Metric:1
              RX packets:14737 errors:0 dropped:0 overruns:0 frame:0
              TX packets:14737 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:824461 (805.1 Kb) TX bytes:824461 (805.1 Kb)
     
    [root@localhost root]# /etc/rc.d/init.d/httpd stop
    Stopping httpd: [ OK ]
    [root@localhost root]# /etc/rc.d/init.d/httpd start
    Starting httpd: [ OK ]

     nmap 192.168.1.100
     
    Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
    Interesting ports on (192.168.1.100):
    (The 1595 ports scanned but not shown below are in state: closed)
    Port State Service
    21/tcp open ftp
    22/tcp open ssh
    111/tcp open sunrpc
    443/tcp open https
    6000/tcp open X11
    8080/tcp open http-proxy
     
    Nmap run completed -- 1 IP address (1 host up) scanned in 3 seconds


  • Next message: Andrew Schulman: "Re: Catch-22: DNS <=> Comcast registration"

    Relevant Pages

    • Re: smtp and iptables
      ... The INPUT chain defines rules coming IN to the box, ... If this is the incoming mail server, then this is what you want ... Connect to your debian box using SSH (port 22) ...
      (comp.os.linux.networking)
    • Re: IIS and SBS 2003
      ... I have a new sbs2003 install and if I telnet to localhost ... port 80, and type hhh and hit enter it returns a HTTP/1.1 400 Bad ... "broken" sbs server, it connects but then dumps me. ... If I http to localhost, companyweb or anything I get Cannot Find ...
      (microsoft.public.windows.server.sbs)
    • Apache cannot access localhost rh9
      ... I tried localhost, localhost:80 and localhost:8080. ... enabled local DHCP Server ... administrator works on port 8081. ... Chain FORWARD ...
      (linux.redhat.install)
    • Re: C# Reflection - Nasty bug??
      ... Can you telnet into localhost to the port your server is running and get ... >>> This happens when LAN connection is present upon starting ...
      (microsoft.public.dotnet.languages.csharp)
    • Jython socket typecasting problems
      ... I try to port a server application to Jython. ... Currently I do face problems with casting the string "localhost" to the ... This is the code section of my server class (I cut this from a Python ...
      (comp.lang.python)