What Could Be Blocking Incoming Connections To My Program?

Hi all,
I am brand new to Linux, playing around a bit with different things to see how I can use it in the future. Here is my problem:

I have written a simple program in Ada that works well on windows. It opens a TCP port (20000) and listens for incoming connections. I tried it on my internal network and it works well. I can connect from other windows machines and even from my Linux machine.

Now I moved the program to Linux and compiled it there. It starts ok and then listens for the connections. I can connect to it from that same Linux machine but not from any other machine on my network.

I checked the firewall status on Linux with ufw status and it is disabled. I also tried to add a rule to the iptables with
iptables -A INPUT -p tcp --dport 20000 -j ACCEPT

but still nothing. I can not connect from another machine on my network. I also tried to open a simple telnet connection from a windows machine and that too is blocked. I thought without the firewall all incoming connections would be allowed but obviously something is not working as I thought.

Any help would be greatly appreciated


Similar Content



SSH And Opening Ports

Hello,

I am trying to set up SSH on my linux machine. I have all the ssh packages downloaded and have added rules to my iptables i.e.

-A INPUT -p tcp -m tcp --dport 62222 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

I also saved all the rules in a file so I could restore the iptables when I reboot the machine.

I also checked to make sure that the ports were open on the network firewall.

So I'm not sure what to do now because everywhere I look it says that once I've added those rules it should work.

Please Help!

Connecting Windows Machine To A Redhat Linux Network

I want to connect a windows workstation to a rh linux network by a 35 meter network cable but it reads 10 Mbps speed and I can't virualize a physical redhat machine in the network
Is the problem with the windows, the cable length or I need to do some configuration in redhat.

Cann Not Connect Remotly By Telnet To Centos 6.6

I have a virtual machine on VmWare 10.0.1
Right now I am trying to make it a web server, apache works and machine has access to the Internet and i can even ping it from other pc from my network but can not connect to it by telnet.
Iptables is set to let everything inside and outside apache works.
PS Sorry for the stupid questions and bad english.

Not Able To Connect To Internet Via 3G Router From Linux

Hello, My issue is very common but, not able to resolve it.

Issue I am facing with my Linux (RHEL-5 32-bit) machine, where I am not able to connect to internet.

DWR-113 - D-Link Router is configured for 3G dongle (Vodafone India) - This setup is done via WiFi and not using the provided LAN cable from Win7 machine.

Internet is working absolutely fine in case of Wireless but, at same time when LAN cable is used internet is not working. [Able to ping to Router IP i.e. 192.168.0.1)

Similarly, from Linux box, ping to Router IP is working [LAN plugged] but, Internet not working. IP of linux machine: 192.168.0.60

Also, able to get the console connection of Linux from Windows box..[Windows connected to Router via WiFi and Linux connected to Router via LAN cable]

Please suggest how to get rid of this problem so that Internet will work on Linux via LAN cable.

Many Thanks,

Network Connection Indicator Icon Disabled.

The Internet connection icon in the notification area of my desktop panel shows the status of my computer's connection to my LAN and hence to the www – at least, it did from the date of first connection, in late 2013, until about December of 2014. It was infallible. Then, shortly before Christmas last year, router trouble on the LAN meant that no Internet service was available for the best part of a week whilst repairs/replacements were effected. Restoration of the LAN brought all four of my computers back on line (1 Linux Mint and 3 Windows XP) Ostensibly nothing had, nor needed to be, changed, as far as net connection addresses were concerned. The XP computers simply picked up where they had left off some days earlier but the Linux machine returned with a disabled LAN connection icon that has remained in that state ever since. Nothing else is affected, I continue to log on and off as normal and enjoy the same network services as before but nothing will now persuade the connection icon to change its disconnected state. If I right click the icon, and then click 'Connection Information', I get, “No valid active connections found,” which is at complete variance with the facts. I have used the 'Edit Connections' option but can find nothing apparently amiss. Wired Connection 1 appears to have retained its previous settings so the loss of function is a bit of a mystery. Anyone got any ideas?

Format A Hard Drive To Work On Machine (dell 32-bit). Have Installed New 1 TB Drive

Want to format a 1 TB Western Digital drive in an old dell 32 bit machine. Machine has Lubuntu installed and a Virtual machine on which which is loaded Windows 7 (32 bit).

Machine does not "see" the new 1 TB (SATA) drive after I physically install it in the machine.

I have other windows and Linux machines. I have some drive cradles in which I can connect to (windows) USB ports.

Is it possible to use the old Dell machine to format the new drive?

(It appears that this question has been answered before. So I will check those materials as well.)

Thanks for any assistance.

Geoffrey Wolfe

Firewall-cmd --state "not Running"

I have been flailing trying to get a web server running on Fedora 21.

Finally did so.

I have my iptables working (me thinks) as they should. I can connect from my Linux box (local) or from my Mac on the same network/subnet.

Problem is in my "travels" I have somehow trashed my firewall-cmd.

I was adding parameters to it w/o issue. E.G
firewall-cmd --zone=public --add-port=80/tcp --permanent
Then restarting firewall-cmd
firewall-cmd --realod

This was all working. I "fixed" my problem with connecting to my web server from other LAN workstations (iptables issues) and was going back to see if all was well. Now when I try to restart I get a:
FirewallD is not running
That from my "reload" command above.

Have I fixed my web server issue or is my world wide open att?

Assistance, as always, greatly appreciated.

Skip

IPTables Config, What Is The Dirrence Between These Statments For Port 80?

Hello! I hope this post get's in the right place, cause I'm a newbie @ Linux

I'm trying to set up a Webserver, apache. And I'm confused which chain to set in IPTables. I hope'd someone could answer me a little more in detail, I've tryed googeling, but the answers were quite confusing for me, anyway here are the statement;

-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

and

-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

A know that that -A INPUT is for incoming packaes, -p specifies protocol TCP. But I'm unsure what -m does? Cause in the first line it is just "-m tcp" and in the second it is "-m state --state". So if someone could explant the diffrence and which one to use, I would be grateful.

And another question while I'm at it; In the start of IPTables I have;
-A INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

What happens if I get a packet destined for some service, that isn't a chain in IPTables? Take port 80 for example, will IPTables accept the packet, but drop it at the end because there isn't any hit? If you understand what I mean. If -A INPUT would be DENY istead of ACCEPT, would the packet never ever get examined further then the first line?

Almost and the bottom of IPTables ther is a line;
-A INPUT -j REJECT --reject-with icmp-host-prohibited

Is it the chain that will be matched if there is not hit prior to it? What would happen if this line wasn't there?

Thank you very much for your help, I'm just wanna be sure little how IPTables work.

Best Regards; Stefan

CentOS 6 - Connection Reset By Peer Error

Hi,

I have a CentOS 6 machine [Machine X], which I connect to using a putty client or from another CentOS 6 machine.

Now, the machine X intermittently sends a connection reset message to all SSH sessions -

Code:
Read from remote host 1.1.1.1: Connection reset by peer
Connection to 1.1.1.1 closed.

I have switched off the firewall on the machine & there are no session timeout values set.

How do I find out what is causing this issue?


Thanks

Bhushan

Iptables Not Active/firewalld Is - My Web Server Is Working But I Have No Idea Why.

This is a copy of my /etc/sysconfig/iptables.conf (w/o comments):
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

- Added the port 80/21 entries.
vsftpd does work.

"iptables-save | grep 80" returns nothing.

My web server works (internal and external).

"systemctl is-active iptables" shows "inactive"
I have "just" gotten firewalld up and running thanks to questions answered here.

iptables is truly a mystery to me.

Can someone explain why my web server/vsftpd are up and working w/o iptables being active? How can I get my network and security both up and working safely together?

If I enable/activate iptables, is this going to break my web server?

Is this the appropriate forum for this question?

As always, thank you for your time and patience,

Skip