title: RabbitMQ works in localhost, but throws BrokerUnreachableException in LAN - (.NET Windows environment.)
body: <p>I'm trying to work with RabbitMQ in a project.</p>
  
  <p>I've installed RabbitMQ Server <code>rabbitmq-server-3.4.4.exe</code> on Win8 (64bit) PC, which has the IP 192.168.100.6.</p>
  
  <p>I have added a user using <code>rabbitmqctl add_user username password</code> in RabbitMQ command prompt.</p>
  
  <p>Tried to receive the message as follows-</p>
  
  <pre><code>ConnectionFactory factory = new ConnectionFactory();
  factory.UserName = "skp";
  factory.Password = "111";
  factory.VirtualHost = "/";
  factory.Protocol = Protocols.DefaultProtocol;
  factory.HostName = "localhost";
  factory.Port = AmqpTcpEndpoint.UseDefaultPort;
          try
          {
              using (var connection = factory.CreateConnection())
              {
                  using (var channel = connection.CreateModel())
                  {
                      channel.QueueDeclare("hello", false, false, false, null);
  
                      var consumer = new QueueingBasicConsumer(channel);
                      channel.BasicConsume("hello", true, consumer);
  
                      Console.WriteLine(" [*] Waiting for messages." +
                                               "To exit press CTRL+C");
                      while (true)
                      {
                          var ea = (BasicDeliverEventArgs)consumer.Queue.Dequeue();
  
                          var body = ea.Body;
                          var message = Encoding.UTF8.GetString(body);
                          Console.WriteLine(" [x] Received {0}", message);
                      }
                  }
              }
          }
          catch (RabbitMQ.Client.Exceptions.BrokerUnreachableException ex)
          {
              Console.WriteLine(ex.Message.ToString());
              Console.WriteLine(ex.Message);
  
              Console.ReadLine();
          }
  </code></pre>
  
  <p>When the hostname="localhost", it works fine. </p>
  
  <p>But if I try to connect from other PC on LAN and hostname="192.168.100.6", it throws a <code>BrokerUnreachableException</code> - "None of the specified endpoints were reachable"</p>
  
  <p>What I missed here?</p>
  
  <p>UPDATE:
  Firewall on 192.168.100.6 (RabbitMQ Server) is turned off.</p>