/srv/irclogs.ubuntu.com/2018/05/20/#ubuntu-server.txt

=== jaskal_ is now known as Guest74988
SynfulAckAnyone know how to allow local lan traffic to a server(16.04) while its connected to a vpn(this case Private Internet Access). I think what i did last time but on centos was use the nm-cli utility and create some route and or metric change to make it prefer a method?00:50
SynfulAckNot familiar with ubuntu to know what to use if thats the case.00:51
dpb1I do something like this in /etc/network/interfaces01:21
dpb1    post-up route add -host 8.8.8.8 gw 10.10.0.101:21
dpb1(where host is some resource I want to add through my local router)01:21
dpb1*access through my local router01:22
SynfulAckdpb1, wb a more general catchall like -network 172.31.255.254 255.240.0.0 and etc to include all of the ipv4 private address space. Not sure i quite understand how that statement affects the network cause id assume if every private ip address was included it might just starting routing everything how it orignally was...03:43
SynfulAcki think i messed up that statement but you get the idea.03:46
SynfulAckdpb1, looks like it works using -net. Thx. Although if any problems came up relating to networking not sure i could make sense of this routing table lol...07:51
mojtabaHello, I am using netcat to test a port that I have opened using ufw. But still it says Connection refused.11:08
mojtabaOn VPS I ran: netcat -l 6326311:08
mojtabaon my laptop: netcat -n -v 167.114.185.238 6326311:08
mojtababut I got (tcp) failed: Connection refused11:09
mojtabaAny idea?11:09
mojtabaufw status: 63263                      ALLOW       Anywhere11:09
kiokomanmojtaba: there is something listening on that port ?11:13
mojtabanetcat11:16
kiokomanmojtaba: netcat is trying to connect to that port, but there must be something on the other side listening to that call else u get connection refused11:30
kiokomaneven if it's open11:31
RoyKmojtaba: try tshark -f "port 63263" on the server side11:34
RoyKmojtaba: just to check if the traffic gets through11:34
mojtabaRoyK: netcat is listening on the server side!11:40
mojtababy netcat -l 6326311:40
tomreynmojtaba: try the netcat command you run on the client, but this time run it on the server (unmodified). does the listening netcat show the incoming connection?11:43
mojtabatomreyn: What do you mean?11:44
RoyKmojtaba: sure, just thought it would be interesting to see if traffic ever arrives to the server11:44
tomreynmojtaba: also, i think the command to make netcat listen would be: netcat -l -p 6326311:44
tomreynmojtaba: opn your server, run this for listening: netcat -l -p 6326311:44
mojtabatomreyn: Yes, -p flag was missing.11:44
tomreynmojtaba: now, also on your server, run this: netcat -n -v 167.114.185.238 6326311:45
tomreyndoes the connection get established according to both client and server netcat?11:46
mojtabatomreyn: The flag -p was missing. but it is working now.11:47
mojtabaI was configuring openvpn, but the problem that I was facing was that, the connection was refused.11:47
tomreynmojtaba: oh ok. i was thinking you meant you just forgot to write "-p" here11:47
tomreynso everything works now, nice.11:48
mojtabatomreyn: Have you any experience with openvpn?11:48
mojtaba:)11:48
tomreynnot much, a bit11:48
tomreynothers probably have more, just ask your questions.11:49
mojtabaI am getting Connection refused on port 63263/tcp11:49
tomreynmojtaba: didnt you just say you solved this issue?11:51
tomreynmojtaba: i mean, with netcat listening on your server and your laptop connecting to that it works, right?11:52
Neo4who know how to open port?13:11
Neo4I want this 5141313:12
Neo4put to my firewall in modem and can't see13:12
Neo4I tested port and it's closed https://ibb.co/j1jLAo13:16
Neo4in transmission13:16
Neo4I created torrent file and trying to get it on virtual computer but it doesn't work13:17
tomreynyou need to have something listen on this port (and on the correct network interface, and the correct IP address, or all of them) AND have no firewalls blocking it.13:18
Neo4tomreyn: do you know how create torrents file in ubuntu?13:18
tomreynalso, the ip protocol needs to be the same on server and client, e.g. tcp, udp, ...13:18
tomreynmost bittorrent applications will offer to do it for you or do it automatically.13:19
Neo4this is my file kselax.ru/Selection_066.png.torrent13:20
Neo4on virtual machine I wait and can't download13:20
tomreynthere's no tracker information on this torrent file.13:22
Neo4tomreyn: I added these trakers manually13:26
Neo4https://paste.ubuntu.com/p/wDCDcp8YjB/13:26
Neo4in my seed file and in virtual machine13:26
Neo4anyway didn't work13:26
Neo4tomreyn: https://ibb.co/nrkJVo13:27
Neo4I think my transmission works only accept files and not give13:28
Neo4https://github.com/transmission/transmission/wiki/Why-is-my-port-closed%3F13:28
Neo4or here13:28
Neo4https://ubuntuforums.org/showthread.php?t=234746313:28
Neo4Need somehow open port 5141313:29
tomreynNeo4: here's how you test whether your server port is firewalled: on the server, stop bittorrent. then run "nc -l -u -vv -p 51413"; now run this on a different computer, such as your desktop / laptop (which needs to connect to the server over the internet): "nc -vv -u -p 51413 SERVERIP" - replace SERVERIP by the public IP address of your server before you do.13:32
tomreynthe client should then connect to the server and any text you type on the client needs to actually show up on the server, and vice versa.13:33
tomreynif all of this works then you have verified that your server port is not firewalled. if it does not work then your server port is probably firewalled. inspect "iptabes -L", if there's nothing clocking connections then talk to your server hosting provider.13:34
tomreyn*b*locking13:35
tomreyn(not 'clocking')13:35
Neo4this  nc -vv -u -p 51413 46.200.157.129 shows error13:36
Neo4nc -l -u -vv -p 51413 this works13:36
Neo4when off bittorrent show port is free13:37
Neo4when bittorren on port is busy13:37
Neo4tomreyn: this I did from my VPS13:37
Neo4https://paste.ubuntu.com/p/PNNgtChGKS/13:37
Neo4here something about ports13:49
Neo4https://transmissionbt.com/help/gtk/2.8x/html/preferences.html#network13:49
Neo4where that automatically map port? there not exists item13:52
Neo4https://transmissionbt.com/help/gtk/2.8x/html/portforward.html13:52
tomreynNeo4: sorry, the command for client was incorrect, use: nc -vv -u 46.200.157.129 5141314:00
Neo4tomreyn: https://paste.ubuntu.com/p/KF7sBhxdwt/14:01
Neo4mean port opened14:01
Neo4transmission closed, now I'll open and test14:01
Neo4equal result14:02
Neo4transmission test show closed port14:02
=== RoyK^ is now known as RoyK_Heime
Neo4tomreyn: see https://ibb.co/fDAzLo14:04
tomreynNeo4: so your netcat client claims it connected fine to the server, but since this is udp (and not tcp) this statement is not reliable. this is why i'm saying you need to type text on the client and server netcat and make sure it is printed on the other end.14:04
Neo4if you have transmission  you can test yours port14:04
tomreynkeep transmission off during these tests14:04
Neo4I'll try14:05
Neo4I think all right with ports14:05
tomreynthat's because only one application can listen on a port at a time.14:05
Neo4Can somebody reach this page? http://46.200.157.12914:32
Neo4What is there?14:32
Neo4tomreyn: try this url14:32
Neo4I see for router need strong password, anybody can reach it14:33
jon_Hi all. Would this be a good place to ask a question about ssh (on ubuntu-server)?14:38
Neo4jon_: yes14:40
Neo4jon_: what the problem?14:40
jon_I can't ssh (Permission denied (publickey)) until after I log in at console.14:40
jon_Neo4, PubKeyAuthentication is yes, PasswordAuthentication is no14:43
Neo4jon_: yes, after installing ssh key to your server14:44
Neo4it will forbid use password14:44
jon_well pubkey auth works but just not after reboot and before a console log in.14:45
jon_Neo4: timeout for that addr on 80 and 44314:47
Neo4jon_: you need this variable14:47
Neo4PasswordAuthentication no14:47
Neo4PubkeyAuthentication yes14:47
Neo4ChallengeResponseAuthentication no14:47
jon_Neo4, those variables are set that way14:49
Neo4jon_: check status14:49
Neo4sudo systemctl status ssh.service14:49
Neo4should be enaubled14:50
Neo4it very top14:50
Neo4or make14:50
Neo4sudo systemctl enable ssh.service14:50
jon_is enabled14:51
Neo4jon_: good it means it will run after each reload automatically14:51
tomreynjon_: unable to login via ssh until you logged in on the console, that's not something i've run into before. are you sure this is related?14:51
Neo4try make login to server using ssh key14:51
Neo4ssh -i path_to_your_public_key your_user@ip_addres14:51
tomreyndo auth.log records look different pre and post console login?14:51
Neo4jon_: if you can connect, change forbid password, put thouse three varialbes, restart server. and check promt it password or only public key14:52
tomreynthe only way i could imagine the console login coming into play there is if the system enters some sleep mode before you do.14:53
jon_tomreyn, I'm not sure but that's what happens. Websearching retuns nothing so seems very obscure. It's a vm on ESXi but not sure if that's relavent.14:53
tomreynjon_: so how about auth.log?14:54
tomreynalso, does the system boot up completely?14:54
tomreynNeo4: it is not an sshd configuration issue.14:55
Neo4you don't off ssh password, just set up ssh key and reload server, and check if you can go using key14:55
tomreynit's also not an issue with how he authenticates.14:55
jon_checking...14:56
Neo4tomreyn: maybe his ssh off and he can't log in14:56
Neo4ok14:56
tomreynwe can rule this out since it works after console login, iwith unmodified sshd configuration and ssh client authentication14:56
jon_before console login auth.log shows: Connection closed by <ip> port <port> [preauth]15:01
jon_dmesg looks ok15:02
jon_<ip> about is the client ip15:05
jon_abouve15:05
tomreynjon_: are you sure the system is fully booted by the time you login to the console? can you show "systemd-analyze blame" and "systemd-analyze critical-chain"?15:11
tomreyni meant to ask: are you sure the system is fully booted by the time you try to ssh in first?15:12
jon_systemd-analyze results: https://pastebin.com/dl/TCg94Mu715:17
jon_hold on15:17
jon_https://pastebin.com/TCg94Mu715:17
tomreynsame url15:18
jon_second one without /dl15:18
tomreynoh right. please use paste.ubuntu.com or some pastebin which doesn't require the other party to work around riddles in the future.15:19
jon_I believe it's fully booted. Trying to log in after a minute or an hour is the same.15:20
jon_Thanks. Didn't know paste.ubuntu.com existed.15:21
tomreyn(pastebin.com can't be accessed from tor without solving a google captcha and accepting their cookies, has referer checks preventing direct access to some locations, requires filling a captcha to post in some cases.)15:22
jon_They must not like you :), doesn't do that to me. https://paste.ubuntu.com/p/q8ZNH38yYz/15:23
tomreynmust be that. ;) okay the systemd boot looks fine, and i'm still not sure what the problem could be.15:23
jon_And I block everything google.15:24
tomreynat this point i guess i'll just back up the ssh configuration and reinstall it.15:24
tomreynat this point i guess i'll just back up the ssh configuration and *purge and* reinstall openssh-server.15:24
jon_ok. purging and installing...15:26
tomreynalso its dependencies15:26
tomreynfirst purge openssh-server and everything related, then install it all again.15:27
jon_ok. Do you mean autoremove after purge?15:30
tomreynjon_: --purge autoremove is good, yes.15:30
tomreyni'd also purge libssl1.0.0, then install again, maybe the openssh client, too, and maybe also the pam libs. apt-cache show openssh-server | grep ^Depends: | head -n115:33
jon_tomreyn, trying to remove libssl1.0.0 complains about python-apt-common and errors out15:43
jon_"umnet dependencies"15:44
tomreynjon_: right, it could break your system, maybe don't do it. if you still want to do it you'd need to purge uit using dpkg --purge15:50
jon_tomreyn, yes I was using using apt. I tried only purging openssh-server and reinstalling to the same result.15:52
jon_I have a snapshot so here goes....15:52
chamarelezium15:58
jon_tomreyn, I tried the default sshd_config and was able to log in via password. Going to compare configs. Thank you very much for your help and time. I'll post back here if I figure it out.16:06
jon_Neo4, thanks for the help.16:07
SmirGelIn my NAS server I've tried to make the HDD to go sleep after 5 hours of idle and seagate ironwolf seems to be ignoring all the commands.16:22
trippeh_hum. isc-dhcp-server6 keeps crashing on bionic16:50
trippeh_../../../lib/isc/heap.c:251: REQUIRE(idx >= 1 && idx <= heap->last) failed, back trace16:50
=== mgagne is now known as Guest74322
jon_tomreyn, this ssh thing is so strange. With Password and PubKey on, it asks for a password the first time after reboot but uses pubkey after that. Same as before I guess but it could ask for the password the first time.18:37
jon_*couldn't18:37
jon_oh well18:37
=== Tm_T is now known as Guest84611
jon_tomreyn, Turns out /home is encrypted which needs the password to unlock before sshd can read authorized_keys. I moved that file out of home, pointed the config to and it works now. No .bashrc anymore but that is minor. Thanks again.19:15
jon_Neo4, Turns out /home is encrypted which needs the password to unlock before sshd can read authorized_keys. I moved that file out of home, pointed the config to and it works now. No .bashrc anymore but that is minor. Thanks again.19:15
Neo4jon_: ok19:16
Neo4jon_: can't torrent make19:17
Neo4https://forum.transmissionbt.com/viewtopic.php?f=1&t=1908619:17
Neo4can create torrent file and can't load using it from virtual machine19:18
jon_Neo4, I don't know about torrents. Is it specific to that or can you not download any file?19:19
tomreynjon_: nice trick there19:20
Neo4jon_: yes, download can,and with torrent you can select any file and create your own torrent file, then put it to torrent site19:20
Neo4for example if you have 50Gb books collection you can easy share it on your site19:21
jon_How are you trying to download it? wget?19:22
Neo4or even a a few terrabaits with torrent not problem19:22
Neo4double click on file19:22
Neo4jon_: this file http://kselax.ru/Selection_066.png.torrent19:23
Neo4it won't work19:23
Neo4I need to try in windows using mtorrent19:23
jon_so you're in a vm that's running on vmware?19:25
Neo4from this site I can download, but can't share http://rutracker.org/forum/index.php19:25
Neo4jon_: no, seed runs on my local computer and on vm I run one more transmission and try download19:26
Neo4I don't know how it should work19:26
Neo4there exists trackers, it might any computer who has file say tracker site that he has full file and can give access to dowload. This calls seed19:27
jon_No idea. Torrents are out of my wheelhouse at this time.19:28
Neo4and user who don't have file say tracker site that they want to download, and might tracker sites connect seeds with leetches19:28
Neo4jon_: ok, :)19:28
Neo4this is very interesting theme19:28
=== pleia2_ is now known as pleia2

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!