LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-17-2016, 10:20 AM   #1
YehudaSinger
LQ Newbie
 
Registered: Jun 2013
Posts: 29

Rep: Reputation: Disabled
Loopback without using 127.0.0.1


Dear sir/Mrs.
I want to create a client-server application on Red-Hat.
For the server, the socket creation and bind work fine. For the client. I have problems if I wand to connect to the client socket with the server socket using the connect function. Suppose that the server IP address is 192.168.1.9. If I get the server information using the getaddrinfo, and use that information for the connect step' the connect function falls. If I use the IP 127.0.0.1 the connect works.
Is there a FIRWALL that prevents me?
Yehuda
 
Old 08-17-2016, 09:59 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,185

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Could be firewall.

The problem with local host is that it sometimes acts odd so don't fully trust any test with it.
 
1 members found this post helpful.
Old 08-18-2016, 03:18 AM   #3
Bubushi
LQ Newbie
 
Registered: Jan 2015
Distribution: Centos, RedHAT, Fedora, Slackware
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
The problem with local host is that it sometimes acts odd so don't fully trust any test with it.
Any particular reason jefro why loopback acts more oddly than any other interface?

I would say it is a problem with the firewall since you can connect through loopback interface. Anyways to be sure you can easily check it with netstat on the server or telnet from the client to the particular tcp port to the server. Or even wireshark to check whether the packets are arriving to the server.

Since you are writing the code yourself you can use exceptions to debug it.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024) adamos22 Linux - Newbie 2 07-31-2013 12:40 PM
Question about Destination 127.0.0.0/8 Packets Sent to Non-loopback Interfaces blackhole54 Linux - Networking 2 12-15-2008 10:59 PM
Sendmail : relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refuse macadam Linux - Software 0 09-23-2007 02:44 PM
What is local host 127.0.0.1 loopback?? cousinlucky Linux - Newbie 12 12-25-2005 04:56 PM
DSN: Data format error & relay=[127.0.0.1] [127.0.0.1] calmbomb Linux - Software 0 11-07-2004 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration