LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-16-2020, 03:33 PM   #1
n00b_noob
Member
 
Registered: Sep 2020
Posts: 196

Rep: Reputation: Disabled
Post Which connections made by a program?


Hello,
How can I find the connections that a program made? For example, I open Firefox, then how can I find the connections that this program made.

Thank you.
 
Old 10-16-2020, 03:40 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,616
Blog Entries: 9

Rep: Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513Reputation: 4513
Sounds like a variation on most of the other threads you started in a very short time...
Remember: research first, ask later.
 
2 members found this post helpful.
Old 10-16-2020, 05:49 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,228

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
netstat
ss

See the man pages or use your favorite search engine.
 
1 members found this post helpful.
Old 10-17-2020, 09:06 AM   #4
n00b_noob
Member
 
Registered: Sep 2020
Posts: 196

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Sounds like a variation on most of the other threads you started in a very short time...
Remember: research first, ask later.
I mean is internet connection. For example, you run OpenVPN and it failed to connect to the remote server. When I execute OpenVPN then how can I find all connections that OpenVPN made and which one failed.
 
Old 10-18-2020, 10:22 AM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: Currently: openSUSE, Raspbian, Slackware. Formerly: CentOS, MacOS, Red Hat. Other: Solaris, Tru64
Posts: 2,127

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by n00b_noob View Post
Hello,
How can I find the connections that a program made? For example, I open Firefox, then how can I find the connections that this program made.

Thank you.
Try: iptraf-ng

HTH...

Update: Ah... For some reason, "by a program" didn't click. (Still an interesting tool as in "Holy cow! Look at all the connections that appear when I visit this web site!")

Last edited by rnturn; 10-18-2020 at 09:15 PM.
 
Old 10-18-2020, 01:22 PM   #6
berndbausch
LQ Guru
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 5,520

Rep: Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654
Some programs have a debug mode that provides details of successful or failed connection requests. I am certain openvpn has that.

You can also audit the connect system call. This is the system call used to request a TCP connection. Such an audit tells you which process performed a connect, and its success or failure.
 
Old 10-20-2020, 06:37 PM   #7
IlyaK
Member
 
Registered: Jun 2017
Location: Northwest Russia
Distribution: Slackware 14.2
Posts: 111

Rep: Reputation: 67
A list of connections made by app named "nginx"

$ ss -p | grep nginx

Try ``man ss``
 
Old 10-20-2020, 06:46 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,228

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Quote:
Originally Posted by n00b_noob View Post
I mean is internet connection. For example, you run OpenVPN and it failed to connect to the remote server. When I execute OpenVPN then how can I find all connections that OpenVPN made and which one failed.
I think we all understand your question...see post #3...again.
 
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
iptables blocks connections made to my server vincix Linux - Security 6 12-13-2016 02:25 PM
squid drops connections to ip addresses, but allows connections to domain names igoryonya Linux - Networking 4 11-07-2014 05:10 PM
squid drops connections to ip addresses, but allows connections to domain names igoryonya Linux - Networking 2 11-06-2014 10:33 PM
2000 MySQL connections, still "too many connections" newlinuxnewbie Linux - General 0 11-07-2005 01:03 PM
Hwo do I log as much information as possible about connections made to Linux Box? jdruin Linux - Security 6 11-10-2003 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:47 AM.

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