Home Sec Lab and Netcat
Im slowly putting together a home lab to help learn/screw around with. The current set-up is a Desktop running a LAMP server with Ubuntu connected via Ethernet to a netgear router. The desktop is also running an SSH server. I forwarded port 22 on the router as well as designated 192.168.1.3 as a reserved address for the Desktop on the router. I'm then using a laptop connected via wireless to the same router to ssh to the desktop for whatever the task may be and that is working fine.
Now i am trying to get comfortable using netcat at least to the point of setting up nc relays. Currently im just trying to use nc for simple IM. i use "nc -lnvp 2233" on the desktop, then try to connect with the laptop using "nc -n 192.168.1.1 2233". The server says it is listening on [any] 2233 … but when i try to type a message in after inputting that command it fails to appear in the terminal on the desktop.
I started up wireshark on the Desktop to see if the packets were even reaching it and indeed they are. Every time i try to connect i get 4 or so packets with the SYN bit set with a destination port of 2233 from 192.168.1.2 (laptop) to 192.168.1.3 . Im just curious if anyone could help me get this to work. I feel like it might be iptables on the desktop maybe but im not really sure. "netstat -l" shows "tcp 0 0 *:2233 : LISTEN " along with a few others of course.
it could be something really dumb and noobish but i would regardless appreciate any input. :)
silen7 wrote: I started up wireshark on the Desktop to see if the packets were even reaching it and indeed they are.
So, the netcat packets are reaching the desktop (server). Does the text that you try to type on the laptop, following the initial connection, also show up in Wireshark? Possibly in multiple packets also coming in on 2233 following the SYN?
silen7 wrote: I feel like it might be iptables on the desktop maybe but im not really sure. "netstat -l" shows "tcp 0 0 *:2233 : LISTEN " along with a few others of course.
To be sure, save your iptables rules and stop iptables (with "iptables save" and "iptables stop", respectively). Then, try the test again.