Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #1666 > unrolled thread

Ports open closed.? and timeouts

Started bySteve Wolf <stevwolf58@gmail.com>
First post2012-09-26 11:13 -0700
Last post2012-09-27 05:36 -0700
Articles 6 — 4 participants

Back to article view | Back to comp.os.linux.networking


Contents

  Ports open closed.? and timeouts Steve Wolf <stevwolf58@gmail.com> - 2012-09-26 11:13 -0700
    Re: Ports open closed.? and timeouts Ralph Spitzner <rasp@spitzner.org> - 2012-09-27 06:49 +0200
    Re: Ports open closed.? and timeouts Simon Quantrill <simon.quantrill@gmail.com.invalid> - 2012-09-27 10:27 +0200
      Re: Ports open closed.? and timeouts Steve Wolf <stevwolf58@gmail.com> - 2012-09-27 03:22 -0700
        Re: Ports open closed.? and timeouts Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-09-27 10:40 +0000
    Re: Ports open closed.? and timeouts Steve Wolf <stevwolf58@gmail.com> - 2012-09-27 05:36 -0700

#1666 — Ports open closed.? and timeouts

FromSteve Wolf <stevwolf58@gmail.com>
Date2012-09-26 11:13 -0700
SubjectPorts open closed.? and timeouts
Message-ID<97fe990b-7b92-4f70-9b83-8b9661ec7ac2@googlegroups.com>
We use a linux computer for our gateway. 

I belive it is based on Centros (if I have that right)
We have been having trouble with a company that hosts a DB for us. There are regular connects and disconnects reported by their software.

I have a number of questions if I may that I would like to ask.

How do I know what outgoing and incoming ports are open.
I was told that the ports are already open. 

Secondly they have suggested that I increase the timeout to 30+ minutes for testing.

So really what I want to know is 


1. How can I see what ports are open outbound and Ibound 

2. how to increase the timeout for these ports.


Thanks.

[toc] | [next] | [standalone]


#1667

FromRalph Spitzner <rasp@spitzner.org>
Date2012-09-27 06:49 +0200
Message-ID<ig2dj9-2fn.ln1@spitzner.org>
In reply to#1666
Steve Wolf wrote:
[...]
> 1. How can I see what ports are open outbound and Ibound

netstat -anp shows who's listening where.
/etc/inedt.conf tells you who gets called by inetd.

nmap yourself from some remote machine.


'outbound' ports are assigned dynamically
(there's no port 21 to port 21 connection)

>
> 2. how to increase the timeout for these ports.

A 'server' or 'listener' listens forever.

not sure about your question here....

	-rasp




-- 
See why I hate Windows users?
      All pain, no gain.
	-Howard Chu

[toc] | [prev] | [next] | [standalone]


#1668

FromSimon Quantrill <simon.quantrill@gmail.com.invalid>
Date2012-09-27 10:27 +0200
Message-ID<50640dd9$0$6857$e4fe514c@news2.news.xs4all.nl>
In reply to#1666
On 2012-09-26 18:13:57 +0000, Steve Wolf said:

> We use a linux computer for our gateway

> There are regular connects and disconnects reported by their software.
> How do I know what outgoing and incoming ports are open.
> I was told that the ports are already open.
Depends what you need to know to check open ports use netstat -an add | 
grep Listening if you wish
then check if it is firewalled using iptables  iptables -L

this shoud give you a list of filtered ports


> 
> Secondly they have suggested that I increase the timeout to 30+ minutes 
> for testing.
Thats bad on IP surely they mean 30 seconds ?

> 
> So really what I want to know is
> 
> 
> 1. How can I see what ports are open outbound and Ibound
> 
> 2. how to increase the timeout for these ports.
Bad move
If you get hanging ports the chances of DoS attack are higher..

I would first check what port the DB is connecting to probably 3306 or 
something similar
The fact that you said it was connecting would suggest that the ports are open
make sure you have no firewall rule causing the issue.

Routing could also be a problem make sure the gateway has correct 
routing defined within the routing table and you can ping each end of 
your link with a decent time. This in fact is the likley casue of speed 
issues..

Good luck

-- 

Simon
----
PGP Key:  D6535CF1
BLOG: http://simon.quantrill.eu

[toc] | [prev] | [next] | [standalone]


#1669

FromSteve Wolf <stevwolf58@gmail.com>
Date2012-09-27 03:22 -0700
Message-ID<0caf9b59-9791-44dd-ab3d-1275e9df3f5e@googlegroups.com>
In reply to#1668
Ok Im confused by a number of things. Perhaps you'all can help me sort it out. 
The ports I need open are the following.

Is it true that 443 is inbound and the rest are outboound?
443, 1494, 2598

It has been indicated to me all outbound ports are opens. 

When I using the command 
netstat -ap 
I think and please correct me if Im worng, that this will only list established connections and listening ports eg software on the server that is listening. However in my case Im using windows and just going through the linux as a firewall. In either case when I type 
netstat -ap |grep 1494
or 
netstat -ap |2598
I get nothing. This tells me that the ports are not open.
BUT elsewhere I have been told that all the ports outbound are open. And the software does work (as Somone mentioned here) proving to me that the ports ARE OPEN. ~ can somoene clarify me on this. 

Im not sure how to interpret the command
iptable -L
I certainly see a lot of "anywhere"s Where would I look to see if all the outbound ports re open.

[toc] | [prev] | [next] | [standalone]


#1670

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2012-09-27 10:40 +0000
Message-ID<slrnk68b8j.1d3.grahn+nntp@frailea.sa.invalid>
In reply to#1669
On Thu, 2012-09-27, Steve Wolf wrote:

Please wrap your lines so I don't have to do it for you.

...
> When I using the command 
> netstat -ap 

> I think and please correct me if Im worng, that this will only list
> established connections and listening ports eg software on the server
> that is listening. However in my case Im using windows and just going
> through the linux as a firewall. In either case when I type 
> netstat -ap |grep 1494
> or 
> netstat -ap |2598
> I get nothing. This tells me that the ports are not open.

Right -- if you have some sort of router or gateway or firewall which
happens to run Linux, the TCP/UDP ports which are open or not there
are irrelevant. A port is "open" when a local application is using it.

The question is: what does that box *really do*?  If it does NAT, then
it has to keep track along the lines of:

 A inside +------+ internet
 B  ----->|      |---->
 C        +------+

"Oh, host A on the inside is sending a TCP SYN through me.  Since I
have to replace the source address (since I do NAT) I have to remember
this, to be able to forward the responses back to A."

Or something. Anyway, the router has to keep track.  And because it
has to keep track, it also has to have a strategy for when to
*forget*, or it will eventually run out of memory.

It sounds as if someone believes the forgetting is based on an idle
timeout setting in the router, and is asking you to increase that
timeout.

> BUT elsewhere I have been told that all the ports outbound are open.
> And the software does work (as Somone mentioned here) proving to me
> that the ports ARE OPEN. ~ can somoene clarify me on this. 

Not enough context, sorry.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

[toc] | [prev] | [next] | [standalone]


#1671

FromSteve Wolf <stevwolf58@gmail.com>
Date2012-09-27 05:36 -0700
Message-ID<f4ac926d-dee3-4177-94d4-2167c7930058@googlegroups.com>
In reply to#1666
Thanks. 
I didnt make the connection between the idle time and the nat. I have learned that on this os I think the idle time is set in.
/proc/sys/net/ipv4/ip_conntrack_max
Mine is set for 65536.
I dont know anything about his file and cant seem to find any real definition for it although there are many messages about changing it to the number which is my default. If it is seconds then my math tells me its 18 hours of Idle time. Am I right ? Does anyone know?

Im still going to ask the questions, primarily for my inquisitive mind. 
If I run some command while the software is transfering data shouldnt I see the port opening and closing. I mean the various command that I mentioned above do show some ports why cant I see those that are being used by the db. 
Regards

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.networking


csiph-web