Netcat message passing in the same LAN doesn't seem to work
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am trying to send one message from one computer in my home LAN to another in the same LAN using netcat.
This is the code I am running in bash:
In PC1
nc -l -p 31337
In PC2 (Private IP Address 192.168.1.10)
nc 192.168.1.10 31337
The problem is that when I send a message in one terminal, nothing seems to appear on the other PC and vice versa.
Doing the same thing on the same PC, but with two terminal windows open, everything works fine. However there is no point in sending one message from one terminal to another in the same computer. What I want is to send from one PC in my home LAN to another.
PS I am working on Ubuntu 16.04.4 on both PCs
linux networking netcat
add a comment |Â
up vote
0
down vote
favorite
I am trying to send one message from one computer in my home LAN to another in the same LAN using netcat.
This is the code I am running in bash:
In PC1
nc -l -p 31337
In PC2 (Private IP Address 192.168.1.10)
nc 192.168.1.10 31337
The problem is that when I send a message in one terminal, nothing seems to appear on the other PC and vice versa.
Doing the same thing on the same PC, but with two terminal windows open, everything works fine. However there is no point in sending one message from one terminal to another in the same computer. What I want is to send from one PC in my home LAN to another.
PS I am working on Ubuntu 16.04.4 on both PCs
linux networking netcat
1
are you running a firewall on either system? What do you get when you runnc -vvv ...
?
â Patrick
Apr 28 at 4:25
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to send one message from one computer in my home LAN to another in the same LAN using netcat.
This is the code I am running in bash:
In PC1
nc -l -p 31337
In PC2 (Private IP Address 192.168.1.10)
nc 192.168.1.10 31337
The problem is that when I send a message in one terminal, nothing seems to appear on the other PC and vice versa.
Doing the same thing on the same PC, but with two terminal windows open, everything works fine. However there is no point in sending one message from one terminal to another in the same computer. What I want is to send from one PC in my home LAN to another.
PS I am working on Ubuntu 16.04.4 on both PCs
linux networking netcat
I am trying to send one message from one computer in my home LAN to another in the same LAN using netcat.
This is the code I am running in bash:
In PC1
nc -l -p 31337
In PC2 (Private IP Address 192.168.1.10)
nc 192.168.1.10 31337
The problem is that when I send a message in one terminal, nothing seems to appear on the other PC and vice versa.
Doing the same thing on the same PC, but with two terminal windows open, everything works fine. However there is no point in sending one message from one terminal to another in the same computer. What I want is to send from one PC in my home LAN to another.
PS I am working on Ubuntu 16.04.4 on both PCs
linux networking netcat
edited Apr 27 at 23:47
Jeff Schaller
31.1k846105
31.1k846105
asked Apr 27 at 23:39
Jack D.
32
32
1
are you running a firewall on either system? What do you get when you runnc -vvv ...
?
â Patrick
Apr 28 at 4:25
add a comment |Â
1
are you running a firewall on either system? What do you get when you runnc -vvv ...
?
â Patrick
Apr 28 at 4:25
1
1
are you running a firewall on either system? What do you get when you run
nc -vvv ...
?â Patrick
Apr 28 at 4:25
are you running a firewall on either system? What do you get when you run
nc -vvv ...
?â Patrick
Apr 28 at 4:25
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
The way you test this is:
1) Open a second window both on PC1 and PC2, start tcpdump
or wireshark
on the LAN interface, e.g. tcpdump -ni eth0
.
2) Do a ping
from PC1 to PC2, and from PC2 to PC1. See if you get ping replies, verify you can see the packets in the dump.
If you can't see the ping replies, something in your network setup is broken. Find it and fix it.
3) Now use nc
, again observe the packets. Depending on the outcome, you now have an idea where the problem is.
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
add a comment |Â
up vote
0
down vote
The problem was that my Windows Firewall was blocking inbound requests to port 31337 (the code in the PC was running on Linux Subsystem for Windows).
So you have to go to Control Panel -> System and Security -> Windows Defender Firewall and choose Advanced Settings. There make a new inbound rule to allow requests to port 31337.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
The way you test this is:
1) Open a second window both on PC1 and PC2, start tcpdump
or wireshark
on the LAN interface, e.g. tcpdump -ni eth0
.
2) Do a ping
from PC1 to PC2, and from PC2 to PC1. See if you get ping replies, verify you can see the packets in the dump.
If you can't see the ping replies, something in your network setup is broken. Find it and fix it.
3) Now use nc
, again observe the packets. Depending on the outcome, you now have an idea where the problem is.
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
add a comment |Â
up vote
0
down vote
accepted
The way you test this is:
1) Open a second window both on PC1 and PC2, start tcpdump
or wireshark
on the LAN interface, e.g. tcpdump -ni eth0
.
2) Do a ping
from PC1 to PC2, and from PC2 to PC1. See if you get ping replies, verify you can see the packets in the dump.
If you can't see the ping replies, something in your network setup is broken. Find it and fix it.
3) Now use nc
, again observe the packets. Depending on the outcome, you now have an idea where the problem is.
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The way you test this is:
1) Open a second window both on PC1 and PC2, start tcpdump
or wireshark
on the LAN interface, e.g. tcpdump -ni eth0
.
2) Do a ping
from PC1 to PC2, and from PC2 to PC1. See if you get ping replies, verify you can see the packets in the dump.
If you can't see the ping replies, something in your network setup is broken. Find it and fix it.
3) Now use nc
, again observe the packets. Depending on the outcome, you now have an idea where the problem is.
The way you test this is:
1) Open a second window both on PC1 and PC2, start tcpdump
or wireshark
on the LAN interface, e.g. tcpdump -ni eth0
.
2) Do a ping
from PC1 to PC2, and from PC2 to PC1. See if you get ping replies, verify you can see the packets in the dump.
If you can't see the ping replies, something in your network setup is broken. Find it and fix it.
3) Now use nc
, again observe the packets. Depending on the outcome, you now have an idea where the problem is.
answered Apr 28 at 6:23
dirkt
14k2930
14k2930
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
add a comment |Â
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
Ok these are the results of what I changed.
â Jack D.
Apr 28 at 8:01
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
First of all I connected both PCs into another LAN network. This time netcat worked but only if the listener was the 2nd PC and the sender the 1st PC (and indeed I could ping PC2 from PC1 but not the opossite). Then I opened wireshark on PC1 and tryed pinging it from PC2, with the results being "Destination Host Unreachable" and on wireshark I see a lot of ARP requests "Who has 192.168.1.10(PC1 IP)?Tell 192.168.1.4 (PC2 IP)"
â Jack D.
Apr 28 at 8:12
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
Please edit question with new information; don't put it in the comments (comments may be deleted by the system at some stage). This looks like something in your LAN configuration is screwed up (firewall on the router?), so you must investigate your routers/your setup.
â dirkt
Apr 28 at 10:09
add a comment |Â
up vote
0
down vote
The problem was that my Windows Firewall was blocking inbound requests to port 31337 (the code in the PC was running on Linux Subsystem for Windows).
So you have to go to Control Panel -> System and Security -> Windows Defender Firewall and choose Advanced Settings. There make a new inbound rule to allow requests to port 31337.
add a comment |Â
up vote
0
down vote
The problem was that my Windows Firewall was blocking inbound requests to port 31337 (the code in the PC was running on Linux Subsystem for Windows).
So you have to go to Control Panel -> System and Security -> Windows Defender Firewall and choose Advanced Settings. There make a new inbound rule to allow requests to port 31337.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The problem was that my Windows Firewall was blocking inbound requests to port 31337 (the code in the PC was running on Linux Subsystem for Windows).
So you have to go to Control Panel -> System and Security -> Windows Defender Firewall and choose Advanced Settings. There make a new inbound rule to allow requests to port 31337.
The problem was that my Windows Firewall was blocking inbound requests to port 31337 (the code in the PC was running on Linux Subsystem for Windows).
So you have to go to Control Panel -> System and Security -> Windows Defender Firewall and choose Advanced Settings. There make a new inbound rule to allow requests to port 31337.
answered Apr 28 at 16:05
Jack D.
32
32
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440516%2fnetcat-message-passing-in-the-same-lan-doesnt-seem-to-work%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
are you running a firewall on either system? What do you get when you run
nc -vvv ...
?â Patrick
Apr 28 at 4:25