tcp – Wireshark – capture website information from other computers

The first of my computer skills is very basic.

I'm trying to find out which websites the computers in my network are visiting.

The target device is a MacBook Air, I have a homehub bell 300 and I use Wireshark on Ubunto Cinnamon 19.1

I'm running Wireshark in promiscuous mode and it only shows information from my computer.

Any help would be very appreciated.

Is it possible to connect remotely to a c-lightning node with an exposed TCP port?

If you run a c-lightning node with EXPOSE_TCP set to True, it seems to me that it should be possible to connect remotely, provided that the RCP c-lightning listens to all incoming traffic. (IP is set to

I've tried the recommended Docker configuration in the c-lightning readme file and when I use socat to connect directly to the inside of the Docker container, everything goes well:

socat - UNIX-CONNECT: /home/simnet/.lightning/lightning-rpc

But when I try to use socat from the container's host, the connection closes directly at the opening, without any error or anything:

company - tcp: 14302

The ports appear to be correctly mapped>9835/tcp

I do not understand what I miss here. Is it even possible to connect remotely with this configuration? I've also read this question, and the answer suggests using socat inside the Docker container to connect the Unix socket to TCP, but it seems to me that the EXPOSE_TCP is supposed to do just that natively.

The firewall only allows port 443.53 and tor port, all other UDP, TCP blocked

I had trouble configuring the router to not lock me. I want to exclude 80 so I do not visit an unencrypted website. I need a suggestion.

java – what are the Edge cases for the following TCP server under Android failed?

I've created a TCP server thread that I want to continue to run and maintain while listening to the IOT device, that is, an RFID reader.
as I only have one customer.
Please review my code and provide your help

Public class TcpServerThread extends the thread {

private static final String TAG = "TcpServerThread";

private boolean run_ = true;
DataInputStream flow;
ServerSocket serverSocket;
Socket clientSocket;

TcpServerThread public () {
start (); // start the thread

public void run () {

Long loop_count = Long.valueOf (0);

byte[] inBytes = new byte[200];
int a = 1025;
IP String = MiscUtilities.getIpAccess ();
Log.d (TAG, "IP" + IP);
// create a socket to listen on a given port
try {
serverSocket = new ServerSocket (a);

} catch (IOException e) {
Log.d (TAG, "run: [exception occured in creating the socket]"+ e.getLocalizedMessage ());

int input = 0;
while (run_) {

Log.d (TAG, "run (): started");
loop_count ++;
try {
while (serverSocket! = null) {
Log.d (TAG, "run (): in progress");
try {
// accept the incoming socket connection request
started a long time ago = System.currentTimeMillis ();
clientSocket = serverSocket.accept ();
clientSocket.setKeepAlive (true);

if (clientSocket! = null) {
long established = (System.currentTimeMillis () - started);
Log.d (TAG, "[Connection made at]: "+ clientSocket.getRemoteSocketAddress () +" in factories: "+ established);

DataInputStream stream = new DataInputStream (clientSocket.getInputStream ());
DataOutputStream outToServer = new DataOutputStream (clientSocket.getOutputStream ());

while ((input = (inBytes)) !! = -1) {
Log.d (TAG, "The size read is" + input);
Log.d (TAG, "Data is" + MiscUtilities.bytesToHex (inBytes));

outToServer.writeByte (10);



} catch (IOException e) {
Log.d (TAG, "IOexception occurred:" + e.getLocalizedMessage ());
Carry on;

} catch (Exception e) {
Log.d (TAG, "EXCEPTION Occurred:" + e.getLocalizedMessage ());
Carry on;


} catch (Exception e) {
// we must pay attention to IllegalStateException cases
Log.d (TAG, "[Exception occured] : "+ e.getLocalizedMessage ());
MiscUtilities.handleSilentException (e);
Carry on;


try {
run a new exception RuntimeException (TAG + "Crashed !!");
} catch (RuntimeException e) {
MiscUtilities.handleSilentException (e);

public void abort () {
run_ = false;
closeServer ();

public void closeServer () {

try {
serverSocket.close ();
clientSocket.close ();
stream.close ();
} catch (Exception e) {
Log.d (TAG, "closeServer:" + e.getLocalizedMessage ());
} finally {
start ();

Can someone review my code and provide comments please?

networking – How to send TCP packets from a specific port to a specific gateway?

The situation is quite strange, but I have a service that runs on a specific port of my home server (Plex Media Server running on 32400). I want to access it from anywhere. The problem is that the server is running a VPN connection that routes all system traffic through the VPN. I've been able to create routes for specific IP addresses in order to use the actual gateway (rather than the tun gateway). However, I would like to create a route that uses the TCP port of the service in question.

I am under Ubuntu 18.04.

I've read that I might be able to use iptables do this, marking the packages in the PREROUTING chain under mutilate. So, following the instructions found here, I was able to tinker with some instructions on how to proceed.

iptables -A PREROUTING -t mangle -p tcp -sport 32400 -j MARK -set-mark 1
echo 201 plex.out >> / etc / iproute2 / rt_tables
rule ip add fwmark 1 table plex.out
ip route add default via dev enp10s0 dev table plex.out

These are the commands I've tried, but the system always makes different routing decisions. I know that requests are received via Ethernet (not the tun), as I can see them with tcpdump easily. However, the responses are sent over the VPN with the help of the tun and the TCP connection can not be established.

tcp – Search for strings in a live packet capture text file using python

I perform a real-time packet capture via Tcpdump and save the result in a simple text file. What I'm trying to do is search for two or more strings in a packet capture text file. Since the packet capture output would never end (until we stop), I'm not able to think of the control flow of the program I want to write in python.
One solution to this problem might be to add a unique keyword after searching for a specific number of rows, and then continuing from that keyword next time.
following the same to the next set of lines again. This will continue until we stop the packet capture data in a flat file.

What I want –

If string1 found:
Print "string1 found"
If string2 found:
Print "string2 found"

TCP / IP, HTTP, UDP connection and peer-to-peer discovery in the bitcoin kernel, cgminer, bfgminer source code

Which files, libraries, classes, code blocks used for the TCP / IP connection, peer-to-peer discovery, HTTP connection, UDP connection in the bitcoin kernel (0.1.5 and the latest versions, including the latest version 0.18.0), other portfolios based on c / c ++, cgminer (first 0.1 and latest versions 4.11.1), bfgminer (first 0.1 and latest versions 5.5.0)? How is network programming done in Bitcoin software? How programmed server, client, peers? And on what programming and software standards, specifications (RFC, ISO, others) is this communication and programming network based? Be more specific and concrete, better with examples of source code.

Files, libraries, classes, code blocks used for TCP / IP connection and peer discovery in the Bitcoin kernel, cgminer, bfgminer

Which files, libraries, classes, code blocks used for the TCP / IP connection, peer-to-peer discovery, http connection, udp connection in Bitcoin Core (0.1.5 and the latest versions, including the latest version 0.18.0) , other portfolios based on c / c ++, cgminer (first 0.1 and latest versions 4.11.1), bfgminer (first 0.1 and latest versions 5.5.0)? How is network programming done in Bitcoin software? How programmed server, client, peers? And on what programming and software standards, specifications (RFC, ISO, others) is this communication and programming network based? Be more specific and concrete, better with examples of source code.

macos – The Docker process opens the TCP port but the connection is denied

How can I run a simple server listening on a port, inside a Docker container?

(If applicable, this is a MacOS X 10.13.6 host.)

When I run a simple HTTP server:

python3 -m http.server 8001

the process starts correctly and listens correctly on this port (confirmed with telnet localhost 8001).

When I run a Docker container, the process is also executed correctly, but the connection is now denied.

web-api / Dockerfile:

FROM Python: 3.7
CMD python3 -m http.server 8001


version: & # 39; 3 & # 39;
host name: web-api
to build:
context: ./web-api/
dockerfile: dockerfile
- "8001"
- "8001: 8001"
- network_api
driver: bridge

When I start the container (s), it runs the HTTP server:

$ docker-compose-up --detach --build
Build a web API

$ docker ps
1db4cd1daaa4 ipsum_web-api "/ bin / sh -c & # 39; python3 ..." 8 minutes ago Up 8 minutes>8001/tcp ipsum_web-api_1

$ docker-machine ssh lorem

docker @ lorem: ~ $ ps -ef | grep http.server
root 12883 12829 0 04:40? 00:00:00 python3 -m http.server 8001

docker @ lorem: ~ $ telnet localhost 8001
[connects successfully]
^ D

docker @ lorem: ~ $ exit

$ telnet localhost 8001
To try :: 1 ...
telnet: connect to address :: 1: connection refused
Try ...
telnet: connect to address connection refused
telnet: unable to connect to the remote host

What is wrong here, so the server works in the interior the Docker container; but the connection is denied on port 8001 when connecting from on the outside the container on its exposed port?

Encryption – Can I use HTTPS to transmit a symmetric key used to encrypt TCP packets?

I am creating a multiplayer game for fun and I want to keep it safe. The client is written in C # and the server in node.js with a functional connection on TCP for the moment. I am new to this subject and implementing something with RSA, Diffie-Hellman or TLS seems confusing and something that I could easily lose. I've planned to use TLS, but I do not know how to do it without using a client certificate. Google is no help because it does not do good negative research if it makes sense. It seems that I only get results for the use of client certificates in TLS. I've therefore had the idea of ​​using HTTPS as a substitute for Diffie-Hellman, by connecting to the server with the help of a self-signed certificate (for clarification , the server is the one that uses the cert, english is weird), validating the login information of the user, and returning a key to use for symmetric encryption for TCP packet transfers.

The general process would be like this:
1. The client initiates the TCP connection with the server and sends the server a temporary ID.
2. The server marks the socket to which the user connects with the temporary ID.
3. The client sends an HTTPS publication to the server with the login information and the temporary ID.
4. The password of the hashes / salts server and compares to the database. In the case of successful validation, give the socket permission with the temporary ID to which the validated user has access. If the automatic validation fails or if no socket corresponding to the temporary ID is found, return an error to the client (400). If successful, generate a key to use for symmetric encryption and return it to the client (200).
5. The client receives the symmetric key and the client and the server use it to speak in future communications.

The temporary ID allows the server to know which TCP socket connection should be allowed when the HTTPS protocol validates the connection information. I think that would be acceptable against the man-type attacks in the middle, because it would only get the temporary ID that would only be used for something else. If the server was changed, the server would not find a socket with a matching ID during the HTTPS phase. and that would only return an error.

I think it would be lower than TLS because there will be no current package signature at step 5 or in future TCP communications, but that could go.

From what I understand from encryption, symmetric keys act only as a kind of encryption. So there is probably not too much overhead to handle on the server side.

Is this system viable?