« first day (2243 days earlier)      last day (2769 days later) » 

7:00 PM
o/
aight, well I've googled my heart out (again) and I still cannot win...
iptstate -D 22 lists:
<myip>:51215
netstat -a lists:
127.0.0.1:13211
my ssh tunnel command is crap, but unfortunately I cannot change that, I connect from device to server with ssh -R 13211:127.0.0.1:13211 -l username server -N
my question is, how do I pair up the ip addresses (actual source) with the port they're attempting to connect under (13211)
 
@rlemon Your question is full of problem-specific jargon that makes it very difficult to understand. You're going to have to fall back to first principles to explain this more simply (which may also help you understand it and answer your own question).
First let's review what ssh -R even does (or what you think it does).
 
no clue, this isn't my domain
I'm attempting to just map ip's to ports
 
First, SSH is built on top of TCP. Every TCP connection has a source IP, source port, destination IP, and destination port. The connection is initially established by the source making an outbound connection to the destination IP:Port. The source port is used when the destination is sending packets back to the source on the established connection.
 
my understanding was I was tunneling port 13211:localhost to 13211:remotehost
(and tbf, for my actual application, that seems to work as expected)
 
Yeah, but to really understand this, you have to understand exactly what it means to tunnel something. The SSH connection establishes an encrypted TCP socket between source and destination. Then, once the remote port forward is established, the SSH daemon on the destination (the SSH server) opens up a new port on localhost:13211, and any connections to localhost:13211 get forwarded (copied) through the tunnel to the localhost:13211 port on the source (client).
 
7:13 PM
okay, yea that makes sense.
 
instructions too complex, hand stuck in jar
now I have to find instructions on how to free my hand
 
@rlemon So I'm still not quite sure what your goal is. Map what IPs to what ports?
 
@allquicatic my goal is that I have N clients connect with that ssh structure, all with different mapped ports.
 
Are you trying to, from the perspective of the server, determine which remote client IP currently providing a remote forwarded port maps to which localhost:XXXX port on the server?
 
I want to obtain their ip given my list of listening ports
@allquicatic just get the actual ip address
the only place I know those exist is the iptable
 
7:16 PM
@rlemon So, to answer my question, "yes", then -- right?
 
yes
just making sure we're on the same page. clearly this isn't my forte
 
OK. That's information that the SSH server has internally, so there should be some way to get that out to the user... hmmm
 
programmers shouldn't be asked to do this stuff :P
 
rlemon I didnt see your car here either
 
@allquicatic so from my testing, I can see the ports connected to localhost when I run netstat
and when I run iptstate I can see my own ip (testing device)
but the port listed next to it isn't the port I would have expected
 
7:18 PM
31
A: List open SSH tunnels

akiraif you only want to list tunnels created by ssh: % sudo lsof -i -n | egrep '\<ssh\>' ssh 19749 user 3u IPv4 148088244 TCP x.x.x.x:39689->y.y.y.y:22 (ESTABLISHED) ssh 19749 user 4u IPv6 148088282 TCP [::1]:9090 (LISTEN) ssh 19749 user 5u IPv4 148088283 TCP 127.0.0.1:9090 (LISTEN...

 
hey rlemon do you know how tcp works in general?
 
always lists the ports under 127.0.0.1
 
sudo lsof -i -n | egrep '\<sshd\>'
run that on the server
 
been at this for a few hours. seen most of those already
I am, it lists everything as 127.0.0.1:port
 
@rlemon what you're seeing is the source port of your connections to the remote port on the server.
source ports are determined pseudorandomly
 
7:20 PM
clients have to know the server's location so the server's port is always static.

client ports are random because when a program tries to connect to a remote host, it will A) connect to that static port B) assign itself an available port in the system it's running.

B) means the port the client is using to communicate to the server is always different.

Does this explain why you aren't seeing 1132 on the client side?
 
is there any way to take that and determine which destination(?) port I am pointing at?
end goal (if it isn't clear): I have a list of ports I'm expecting clients to connect on, I just want to fill it with their ips
if I'm barking up the wrong tree, stop me now
 
@rlemon The problem is, the only place where the information "associating" any given localhost:port to a given SSH client IP, is stored, is within the sshd's memory.
 
hrm
 
Your last resort may be to parse SSHD's logs, and put it on maximum verbosity.
It'll probably write something to the log when you remote port forward.
 
so the clients are programmed to connect using a specific local port? well that's tough because if you have multiple computers on your LAN, the router or modem or gateway might be assigning different public ports than the ones you specify locally
 
7:22 PM
Try this on the server: go into /etc/ssh/sshd_config and look for any settings about debugging, verbosity, etc. and set it to maximum
then restart sshd, then check the logs when you initiate a remote port forward connection
and see what it writes to the log - then see if you can parse that out using regex or something to build your "map"
 
I assume restarting sshd kills all active connections?
because yea, can't do that
 
actually...
 
because if you think about it, several computers on your LAN trying to communicate with a remote host might choose the same local port. if the gateway did not assign unique ports you'd had 4 different computers looking like 123.234.234.23:58 . where should the incoming traffic go if there's 4 of those?
 
@CausingUnderflowsEverywhere I have no idea what you're talking about.
 
@rlemon depends on the version of your OS and SSHD and such, but at least on recent Ubuntu and RHEL, both reload and restart of sshd do not kill active connections
 
7:24 PM
I'm not being rude by ignoring you, just struggling with this in general so trying to focus on one person
 
reload is always safe and will never kill connections
restart doesn't, either, on at least Ubuntu 14.04 and later
 
Im going to make an mspaint picture out of it
 
it's some kind of magic
 
/me looks in
 
@allquicatic 12.04 new enough?
 
7:25 PM
@rlemon ack, don't know
 
@rlemon OH THE TABLES HAVE TURNED \o/
 
if you have another server to test it on that's 12.04, I would try it there
 
/me reads backl;og
 
I'm not 100% certain that sshd restart on 12.04 won't bounce connections
 
@allquicatic none of this will be an issue in January when the process is complete and I can take devices offline :(
so If it is going to cause downtime I'm leaning towards just moving on
 
7:26 PM
@rlemon welp, time to fire up a 12.04 VM, SSH to it, and restart sshd
 
(gonna test on 12.04 anyway)
 
actually a reload of the config might be enough to update the verbosity without restarting the daemon
reload just tells it to reparse its config but doesn't kill and restart the process
 
just pointing that out, I can just walk away from this for a better solution (the client sends me their ip)
 
restart kills the process, but it somehow keeps the connections alive during it through some incredible magic
if it's a new enough version
yeah on Ubuntu 12.04 you can try doing a reload on sshd first
that'll definitely be safe
 
from my understanding you want to set the local ports in clients to static ones, like assign specific ones, so then your ssh server knows who's who because of the port they connect on, but unfortunately that's not possible if the gateway maps ports as seen on the public side of the network
@rlemon
 
7:35 PM
none of that makes sense to me
you're trying to explain big o to a vb developer
 
a gateway might be a router or modem
 
well it doesn't have to make sense, anyone can correct me if Im wrong but your server might not see the actual port number traffic is coming from. that's all you need to know
 
I learned of these today. I needed them two years ago.
 
reloading ssh, crossing fingers, expecting the worst (I am a lemon)
 
7:38 PM
IM SO STRESSED OUT BYE GUYS
 
@CausingUnderflowsEverywhere grab a beer and watch some youtube
there are some nice woodworking channels I can recommend, very soothing :D
 
@Hennes Für größere Ansicht Maus über das Bild ziehen
Adchkeschafturgënschisch
 
Das ist ja klar
I did not realise that the webpage was in German.
 
What am I looking at? An HDMI plug who hates me very much?
 
@ThatBrazilianGuy @Hennes is Dutch not German IIRC
 
7:41 PM
It is a virtual monitor. PLug in and the computer thinks that you plugged ina monitor.
Needed with some graphics when you want to set a sane resolution, but have no actual monitor connected.
 
@allquicatic nada :( seeing the same information I saw in iptstate
 
@rlemon anything happen?
check /var/log/ssh (I don't know the exact path, hit tab and see what's there)
also /var/log/syslog
 
ahh
 
E.g. if I boot a laptop with no monitor (lid closed as usual) and I teamviewer in I can only use 640x480 or 800x600.
 
I was only looking in auth.log
 
7:42 PM
So emulating a monitor is needed
Same in case of some GPU using programs. Sometimes the card gets disabled when you did not plug in a monitor.
So no OpenCL or similar without connecting a needless monitor.
 
@DavidPostill Tell him that, he linked amazon.de
 
With VGA plugs you could trick that by connecting a resistor to two pins if the VGA port.
For DP and DVI you need some more work.
No amazon.nl. So we dutch use either amazon.de or amazon.co.uk
 
yea, not seeing anything useful in here
 
Or amazon.com and add two months shipping time
 
@allquicatic thanks for the time, I think I'm going to shelve it for now
@CausingUnderflowsEverywhere thanks as well.
 
7:45 PM
@Hennes Neat. What resolution does it go up to?
 
@Hennes I've got six months shipping time from China.
 
The one linked seem to do 1080, the 4K version.... well that name gives it away
 
Oh. Missed that.
 
For what I needed it I just connected a real 1920x1200 monitor which I did not look at. 24" of space and some power wasted just to be able to properly remote in.
Wird oft zusammen gekauft... CompuLab fit-Headless 4K - High-Resolution-Display-Emulator EUR 29,00
(often bought at the same time as .... )
 
8:08 PM
Ah, election times. So much simpler in some countries.
user image
2
 
8:36 PM
Yipes.
Cert. Auth lying about dates. And the reaction on that from Mozilla.
If you have WoSign or StartCom certs, better read it.
 
my god, parents are hard work
my mum has had an android tablet for ages (about 18 mths) but trying to get her used to her new xperia is tough
 
@rlemon no time I musnt be late
 
 
2 hours later…
11:02 PM
@CausingUnderflowsEverywhere no, since a lot of that is recovery related
 
Bob
11:42 PM
@JourneymanGeek ?
 
Hello power users
 
Hi!
 
Which free software open source or not you would recommend to cut and merge video files?
I've a bunch of old .VOB files I would like to cut and merge
 
Command-line, or GUI?
 
before converting
Whatever but GUI is always better haha
 
11:46 PM
mediacoder?
 
Oh and I would like to do this without having to reencode the video! It would take weeks if I were to recode every file to cut and merge
 
@Bob someone asking on threading on Firefox a few lines up.
For some reason I remember you poking at that.
 
Bob
@JourneymanGeek Not sure I remember that :P
 
ah. Meh.
 
Bob
@vin Vaguely: you'd want to look at things like OMTC (and APZ?) and service workers
Is there any particular reason you want to know?
@allquicatic Did you ever find me on Allo?
@vin Also, FYI, threads are cheap and often throwaway. Things like network requests might even end up on their own thread, who knows. Are you sure you aren't mixing it with processes (multiprocess, e10s/electrolysis)?
 
11:57 PM
@Bob nope
 
@allquicatic Do you know if mediacoder can cut the videos without recoding ?
 
I think you have to use a phone number (?)
 
Bob
@allquicatic ...I thought I used your phone number O_O
Don't you have mine from the messages earlier?
 

« first day (2243 days earlier)      last day (2769 days later) »