Quantcast
Channel: Ubuntu Forums - Networking & Wireless
Viewing all 23300 articles
Browse latest View live

[ubuntu] Receive broadcast of the UDP from an IP address same as oneself

$
0
0
I am writing a udp program in C on Ubutu 18.04.
The program can receive successfully if the IP address is different from oneself.
However, when I from the same address as own IP, The program waits forever with the recvfrom function and can not receive the broadcast.
Checked in tcpdump, UDP seems to reach certainly.
I set rp_filter to 0 but the situation does not change.
I could receive using PF_PACKET. Is there any way to receive using AF_INET?
Please advise and thanks for looking.

sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
addr
.sin_family = AF_INET;
addr
.sin_port = htons(PORT);
addr
.sin_addr.s_addr = inet_addr(BroadCastAddr);
if(bind(sock ,(struct sockaddr *)&addr,sizeof(addr))<0){
perror
("bind");
}
recv
( sock, sRcvBuf[sHead],sizeof(sRcvBuf[sHead]),0);



Native ssh in Windows10

$
0
0
Are there any drawbacks from using the native ssh in windows 10 or is it comparable to using ssh on a unix-like system?

[ubuntu] linux network manager interface

$
0
0
I use a PIA vpn. I have had some minor problems and have contacted them for help. They came back and told me to access "linux network manager interface". I replied that I had no idea what, exactly, that was. The inference was that there was a gui for "linux network manager interface". They never responded. This is not critical but I was wondering, what are they referencing? The specific problem, in this case, is that they have two systems to install their product. One is to using the terminal for about 4 commands which installs, and runs the pia vpn. The other involves downloading pia and then running the download. The difference between the two is that the first installs their system that is recognized by ubuntu 18.04 and the second which is not recogized by Ubuntu 18.04. Both work. Oh, the first also has an icon reflecting whether it is connected or not. The second doesn't but there is a gnome extension which will tell the user if the vpn is up or not (actually says; "VPN is up!" (or down).

The PIA tech inferred that one can goto the "linux network manager interface" and tell the system which to use. Right now all I know is that the vpn is working.

Anyway..............

Thank you..........

[other] IPsec IKEv2 succesful but Linux VTI does not work with SNAT

$
0
0
Hi everyone.
If you think troubleshooting IPsec is tedious, please forget about my logs and just let me know the implementation process, I'm still confused and any information is helpful.

I removed SPIs and here is my IP map:
Code:

Our private IP address:
10.1.1.2
Our S-NAT IP address:
172.16.0.1
Our Pubic/EIP address:
1.1.1.1
CheckPoint GW:
2.2.2.2
Instance behind CheckPoint:
192.168.1.1

On the leftside I have StrongSWAN on AWS EC2 instance behind its 1:1 NAT and Elastic IP with this configuration:

/etc/ipsec.conf:
Code:

config setup
    # strictcrlpolicy=yes
    # uniqueids = no
    charondebug="ike 2, knl 2, cfg 2"

conn %default
    keyexchange=ikev2
    ike=aes256-sha256-modp2048
    ikelifetime=86400s
    esp=aes256-sha256-modp2048
    lifetime=10800s
    keyingtries=%forever
    dpddelay=30s
    dpdtimeout=120s
    dpdaction=restart

conn Tunnel1
    auto=start
    left=10.1.1.2 # Our private IP address
    leftsubnet=172.16.0.1/32 # Our S-NAT IP address
    leftauth=psk
    leftid=1.1.1.1 # Our Pubic/EIP address
    right=2.2.2.2 # CheckPoint GW
    rightsubnet=192.168.1.1/32 # Instance behind CheckPoint
    rightauth=psk
    rightid=2.2.2.2 # CheckPoint GW
    type=tunnel
    compress=no
    mark=42

/etc/ipsec.secrets:
Code:

1.1.1.1 2.2.2.2 : PSK "OURSECRET"
/etc/strongswan.d/charon.conf:
Code:

install_routes = no
install_virtual_ip = no

and on the rightside there is a CheckPoint device that is behind a firewall that accepts policy only if the source of the packet is 172.16.0.1/32 and its destination is 192.168.1.1/32.

But I don't have that IP on my interface and it's a pseudo IP to hide our private range from the rightside (CheckPoint).

This instance should act as a router and pass traffic from other instances through IPsec tunnel but every packet should be SNATed to 172.16.0.1/32.

I start StongSWAN:
Code:

systemctl start strongswan && systemctl status -l strongswan
Code:

Loaded: loaded (/lib/systemd/system/strongswan.service; disabled; vendor preset: enabled)
  Active: active (running) since Tue 2019-07-23 10:20:22 EEST; 12s ago
  Process: 2163 ExecStart=/usr/sbin/ipsec start (code=exited, status=0/SUCCESS)
  Process: 2160 ExecStartPre=/bin/mkdir -p /var/lock/subsys (code=exited, status=0/SUCCESS)
 Main PID: 2190 (starter)
    Tasks: 18
  Memory: 12.2M
      CPU: 54ms
  CGroup: /system.slice/strongswan.service
          ├─2190 /usr/lib/ipsec/starter --daemon charon
          └─2191 /usr/lib/ipsec/charon --use-syslog --debug-ike 2 --debug-knl 2 --debug-cfg 2

Configure iptables:
Code:

iptables --append INPUT -s 2.2.2.2 -j ACCEPT
iptables --append INPUT -d 2.2.2.2 -j ACCEPT
iptables --table mangle --append FORWARD -o Tunnel1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

Check IKEv2 is successful:
ipsec statusall
Code:

Status of IKE charon daemon (strongSwan 5.3.5, Linux 4.4.0-1087-aws, x86_64):
  uptime: 79 seconds, since Jul 23 10:20:22 2019
  malloc: sbrk 1646592, mmap 0, used 568016, free 1078576
  worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 4
  loaded plugins: charon test-vectors aes rc2 sha1 sha2 md4 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl fips-prf gmp agent xcbc hmac gcm attr kernel-netlink resolve socket-default connmark farp stroke updown eap-identity eap-sim eap-sim-pcsc eap-aka eap-aka-3gpp2 eap-simaka-pseudonym eap-simaka-reauth eap-md5 eap-gtc eap-mschapv2 eap-dynamic eap-radius eap-tls eap-ttls eap-peap eap-tnc xauth-generic xauth-eap xauth-pam xauth-noauth tnc-tnccs tnccs-20 tnccs-11 tnccs-dynamic dhcp lookip error-notify certexpire led addrblock unity
Listening IP addresses:
  10.1.1.2
Connections:
    Tunnel1:  10.1.1.2...2.2.2.2  IKEv2, dpddelay=30s
    Tunnel1:  local:  [1.1.1.1] uses pre-shared key authentication
    Tunnel1:  remote: [2.2.2.2] uses pre-shared key authentication
    Tunnel1:  child:  172.16.0.1/32 === 192.168.1.1/32 TUNNEL, dpdaction=restart
Security Associations (1 up, 0 connecting):
    Tunnel1[1]: ESTABLISHED 79 seconds ago, 10.1.1.2[1.1.1.1]...2.2.2.2[2.2.2.2]
    Tunnel1[1]: IKEv2 SPIs: ##**REMOVED**##* ##**REMOVED**##, pre-shared key reauthentication in 23 hours
    Tunnel1[1]: IKE proposal: AES_CBC_256/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048
    Tunnel1{1}:  INSTALLED, TUNNEL, reqid 1, ESP in UDP SPIs: c05ce72f_i 35f8fdaa_o
    Tunnel1{1}:  AES_CBC_256/HMAC_SHA2_256_128, 0 bytes_i, 0 bytes_o, rekeying in 2 hours
    Tunnel1{1}:  172.16.0.1/32 === 192.168.1.1/32

Check if XFRM policies has been added:
ip -s -s xfrm policy:
Code:

src 192.168.1.1/32 dst 172.16.0.1/32 uid 0
    dir fwd action allow index 82 priority 2819 share any flag  (0x00000000)
    lifetime config:
      limit: soft (INF)(bytes), hard (INF)(bytes)
      limit: soft (INF)(packets), hard (INF)(packets)
      expire add: soft 0(sec), hard 0(sec)
      expire use: soft 0(sec), hard 0(sec)
    lifetime current:
      0(bytes), 0(packets)
      add 2019-07-23 10:20:22 use -
    mark 0x2a/0xffffffff
    tmpl src 2.2.2.2 dst 10.1.1.2
        proto esp spi 0x00000000(0) reqid 1(0x00000001) mode tunnel
        level required share any
        enc-mask ffffffff auth-mask ffffffff comp-mask ffffffff
src 192.168.1.1/32 dst 172.16.0.1/32 uid 0
    dir in action allow index 72 priority 2819 share any flag  (0x00000000)
    lifetime config:
      limit: soft (INF)(bytes), hard (INF)(bytes)
      limit: soft (INF)(packets), hard (INF)(packets)
      expire add: soft 0(sec), hard 0(sec)
      expire use: soft 0(sec), hard 0(sec)
    lifetime current:
      0(bytes), 0(packets)
      add 2019-07-23 10:20:22 use -
    mark 0x2a/0xffffffff
    tmpl src 2.2.2.2 dst 10.1.1.2
        proto esp spi 0x00000000(0) reqid 1(0x00000001) mode tunnel
        level required share any
        enc-mask ffffffff auth-mask ffffffff comp-mask ffffffff
src 172.16.0.1/32 dst 192.168.1.1/32 uid 0
    dir out action allow index 65 priority 2819 share any flag  (0x00000000)
    lifetime config:
      limit: soft (INF)(bytes), hard (INF)(bytes)
      limit: soft (INF)(packets), hard (INF)(packets)
      expire add: soft 0(sec), hard 0(sec)
      expire use: soft 0(sec), hard 0(sec)
    lifetime current:
      0(bytes), 0(packets)
      add 2019-07-23 10:20:22 use -
    mark 0x2a/0xffffffff
    tmpl src 10.1.1.2 dst 2.2.2.2
        proto esp spi 0x00000000(0) reqid 1(0x00000001) mode tunnel
        level required share any
        enc-mask ffffffff auth-mask ffffffff comp-mask ffffffff

ip -s -s xfrm state:
Code:

src 10.1.1.2 dst 2.2.2.2
    proto esp spi ##**REMOVED**##(##**REMOVED**##) reqid 1(0x00000001) mode tunnel
    replay-window 32 seq 0x00000000 flag af-unspec (0x00100000)
    mark 0x2a/0xffffffff
    auth-trunc hmac(sha256) ##**REMOVED**## (256 bits) 128
    enc cbc(aes) ##**REMOVED**## (256 bits)
    encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
    anti-replay context: seq 0x0, oseq 0x0, bitmap 0x00000000
    lifetime config:
      limit: soft (INF)(bytes), hard (INF)(bytes)
      limit: soft (INF)(packets), hard (INF)(packets)
      expire add: soft 9745(sec), hard 10800(sec)
      expire use: soft 0(sec), hard 0(sec)
    lifetime current:
      0(bytes), 0(packets)
      add 2019-07-23 10:20:22 use -
    stats:
      replay-window 0 replay 0 failed 0
src 2.2.2.2 dst 10.1.1.2
    proto esp spi ##**REMOVED**##(##**REMOVED**##) reqid 1(0x00000001) mode tunnel
    replay-window 32 seq 0x00000000 flag af-unspec (0x00100000)
    mark 0x2a/0xffffffff
    auth-trunc hmac(sha256) ##**REMOVED**## (256 bits) 128
    enc cbc(aes) ##**REMOVED**## (256 bits)
    encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
    anti-replay context: seq 0x0, oseq 0x0, bitmap 0x00000000
    lifetime config:
      limit: soft (INF)(bytes), hard (INF)(bytes)
      limit: soft (INF)(packets), hard (INF)(packets)
      expire add: soft 10057(sec), hard 10800(sec)
      expire use: soft 0(sec), hard 0(sec)
    lifetime current:
      0(bytes), 0(packets)
      add 2019-07-23 10:20:22 use -
    stats:
      replay-window 0 replay 0 failed 0

Create VTI device:
Code:

ip tunnel add Tunnel1 local 10.1.1.2 remote 2.2.2.2 mode vti key 42
ip addr add 172.16.0.1/32 remote 192.168.1.1/32 dev Tunnel1
ip link set Tunnel1 up mtu 1419

Disable policy on tunnel and adding iptables TCPMSS:
Code:

sysctl -w net.ipv4.conf.Tunnel1.disable_policy=1
iptables --table mangle --append FORWARD -m policy --pol ipsec --dir in -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360
iptables --table mangle --append FORWARD -m policy --pol ipsec --dir out -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360

but when I ping 192.168.1.1 with source 172.16.0.1, I get Destination Host Unreachable.
Code:

ping 192.168.1.1 OR ping -I 172.16.0.1 192.168.1.1 OR ping -I Tunnel1 192.168.1.1
Code:

ping -c 3 -I 172.16.0.1 192.168.1.1
PING 192.168.1.1 (192.168.1.1) from 172.16.0.1 Tunnel1: 56(84) bytes of data.
From 172.16.0.1 icmp_seq=1 Destination Host Unreachable
From 172.16.0.1 icmp_seq=2 Destination Host Unreachable
From 172.16.0.1 icmp_seq=3 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1998ms

here are some other logs:
ip address show:
Code:

3: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
4: Tunnel1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1419 qdisc noqueue state UNKNOWN group default qlen 1
    link/ipip 10.1.1.2 peer 2.2.2.2
    inet 172.16.0.1 peer 192.168.1.1/32 scope global Tunnel1
      valid_lft forever preferred_lft forever

ip -s -s link show:
Code:

3: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
    RX: bytes  packets  errors  dropped overrun mcast
    0          0        0      0      0      0
    RX errors: length  crc    frame  fifo    missed
              0        0      0      0      0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0      0      0      0
    TX errors: aborted  fifo  window heartbeat transns
              0        0      0      0      0
4: Tunnel1@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1419 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/ipip 10.1.1.2 peer 2.2.2.2
    RX: bytes  packets  errors  dropped overrun mcast
    0          0        0      0      0      0
    RX errors: length  crc    frame  fifo    missed
              0        0      0      0      0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        14      0      14      0
    TX errors: aborted  fifo  window heartbeat transns
              0        0      0      0      0

ip -s tunnel show Tunnel1:
Code:

Tunnel1: ip/ip  remote 2.2.2.2  local 10.1.1.2  ttl inherit  key 42
RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts
    0          0            0      0        0        0
TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs
    0          0            14    0        14      0

ifconfig -a:
Code:

Tunnel1  Link encap:IPIP Tunnel  HWaddr
          inet addr:172.16.0.1  P-t-P:192.168.1.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1419  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:14 dropped:0 overruns:0 carrier:14
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
ip_vti0  Link encap:IPIP Tunnel  HWaddr
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I disabled source and destination check on AWS EC2 and I whitelisted the rightside (Checkpoint) IP addess for all traffic in AWS security groups, I'm sure NAT-Traversal is supported and I can see it's traffic with tcpdump:
tcpdump -i any -nnnNq host 2.2.2.2
Code:

10:32:02.983136 IP 10.1.1.2.500 > 2.2.2.2.500: UDP, length 1084
10:32:03.035572 IP 2.2.2.2.500 > 10.1.1.2.500: UDP, length 708
10:32:03.044827 IP 10.1.1.2.4500 > 2.2.2.2.4500: UDP, length 372
10:32:03.108335 IP 2.2.2.2.4500 > 10.1.1.2.4500: UDP, length 276
10:32:27.042735 IP 10.1.1.2.4500 > 2.2.2.2.4500: UDP, length 1
10:32:33.110661 IP 10.1.1.2.4500 > 2.2.2.2.4500: UDP, length 84
10:32:33.159623 IP 2.2.2.2.4500 > 10.1.1.2.4500: UDP, length 84
10:32:57.043342 IP 10.1.1.2.4500 > 2.2.2.2.4500: UDP, length 1
10:33:03.110977 IP 10.1.1.2.4500 > 2.2.2.2.4500: UDP, length 84

CheckPoint shows the tunnel has been established but I don't get any tcpdump when I send ping packets.
journalctl -fu strongswan is available from here:

https://pastebin.com/AuephC04

I tried VTI endpoint this way too but it did not make any changes:
Code:

ip tunnel add Tunnel1 local 10.1.1.2 remote 2.2.2.2 mode vti key 42
ip addr add 172.16.0.1/32 remote 0.0.0.0/0 dev Tunnel1
ip link set Tunnel1 up mtu 1419

Am I implementing this structure correctly? Should I set the pseudo IP on the VTI device? Should I add another iptables rule to apply MARK something like this?
Code:

iptables -t mangle -A INPUT -p esp -s 2.2.2.2 -d 1.1.1.1 -j MARK --set-xmark 42
Versions:

ipsec --version:
Code:

Linux strongSwan U5.3.5/K4.4.0-1087-aws
lsb_release -a:
Code:

Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:    xenial

dpkg -l | grep -i strongswan:
Code:

ii  libcharon-extra-plugins          5.3.5-1ubuntu3.8                          amd64        strongSwan charon library (extra plugins)
ii  libstrongswan                    5.3.5-1ubuntu3.8                          amd64        strongSwan utility and crypto library
ii  libstrongswan-standard-plugins  5.3.5-1ubuntu3.8                          amd64        strongSwan utility and crypto library (standard plugins)
ii  strongswan                      5.3.5-1ubuntu3.8                          all          IPsec VPN solution metapackage
ii  strongswan-charon                5.3.5-1ubuntu3.8                          amd64        strongSwan Internet Key Exchange daemon
ii  strongswan-libcharon            5.3.5-1ubuntu3.8                          amd64        strongSwan charon library
ii  strongswan-starter              5.3.5-1ubuntu3.8                          amd64        strongSwan daemon starter and configuration file parser
ii  strongswan-tnc-base              5.3.5-1ubuntu3.8                          amd64        strongSwan Trusted Network Connect's (TNC) - base files

Thanks in advance for your help.

Wireless is not working

$
0
0
Hello I am using an HP Laptop and I currently have Ubuntu 18.04 installed on it. It is using a realtek driver and it will not let me connect to wireless.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2a94:5009
Bus 001 Device 004: ID 0bda:b00a Realtek Semiconductor Corp.
Bus 001 Device 003: ID 04f2:b65d Chicony Electronics Co., Ltd
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


That is the result when I used lsusb.

hp_wmi 16384 0
wmi_bmof 16384 0
intel_wmi_thunderbolt 16384 0
snd_soc_acpi 16384 1 snd_soc_skl
snd_rawmidi 32768 1 snd_seq_midi
wmi 24576 3 hp_wmi,intel_wmi_thunderbolt,wmi_bmof
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd 81920 22 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_h da_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_code c,snd_hda_codec_realtek,snd_timer,snd_compress,snd _soc_core,snd_pcm,snd_rawmidi
sparse_keymap 16384 2 hp_wmi,intel_vbtn
acpi_thermal_rel 16384 1 int3400_thermal
acpi_pad 180224 0

That is the result when I used lsmod | grep -e wmi -e acpi. If someone could please give me some insight on what I am not doing correctly it would be greatly appreciated!

Wi-fi randomly stops. Supplicant network-manager issues. Failed to set WFD IES and re

$
0
0
I've been having this issue for weeks. I looked it up in the web but doesn't seem to be working solutions.

The thing is that after a couple of hours of use my wifi randomly disconnects.

While the network is working, if I do

Code:

    sudo service network-manager status
There's no issue at all.
The device (wlo1) activation is "successful, device activated". and the supplicant is okay, saying "supplicant: wpa_supplicant die count reset".

Meanwhile, if I check the network manager status when is down. I've two warns.

The status explain in one hand

Code:

    supplicant: failed to set WFD IEs on wpa_supplicant: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconneected from message bus without replying
And, in the other hand

Code:

    device (wlo1): re-acquiring supplicant interface (#1)
Any help really would help. Thanks.


Details of my wireless card:

Code:

    *-network               
          description: Ethernet interface
          product: RTL810xE PCI Express Fast Ethernet controller
          vendor: Realtek Semiconductor Co., Ltd.
          physical id: 0
          bus info: pci@0000:01:00.0
          logical name: eno1
          version: 07
          serial: b0:5a:da:d0:bb:31
          size: 10Mbit/s
          capacity: 100Mbit/s
          width: 64 bits
          clock: 33MHz
          capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
          configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
          resources: irq:16 ioport:2000(size=256) memory:91004000-91004fff memory:91000000-91003fff memory:91500000-9150ffff
      *-network
          description: Wireless interface
          product: RTL8188EE Wireless Network Adapter
          vendor: Realtek Semiconductor Co., Ltd.
          physical id: 0
          bus info: pci@0000:02:00.0
          logical name: wlo1
          version: 01
          serial: 18:4f:32:b6:95:3a
          width: 64 bits
          clock: 33MHz
          capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
          configuration: broadcast=yes driver=rtl8188ee driverversion=5.0.0-20-generic firmware=N/A ip=192.168.0.110 latency=0 link=yes multicast=yes wireless=IEEE 802.11
          resources: irq:121 ioport:1000(size=256) memory:91100000-91103fff

Edit: I use Ubuntu 19.04 Disco Dingo.

ubuntu 19.04: AWUS 036ach not working

$
0
0
Hey, the device used to work and now I wasnt able to make it work. I have another TPLINK wifi adapter and it works so I dont know what could be happening. I ran a command I found on this same forum and this is the output:

Code:

mokutil --sb-state; dkms status
SecureBoot disabled
Platform is in Setup Mode
nvidia, 418.56, 5.0.0-17-generic, x86_64: installed
nvidia, 418.56, 5.0.0-19-generic, x86_64: installed
nvidia, 418.56, 5.0.0-20-generic, x86_64: installed
nvidia, 418.56, 5.0.0-21-generic, x86_64: installed
rtl8812au, 4.3.14, 4.15.0-42-generic, x86_64: built
rtl8812au, 4.3.14, 4.15.0-47-generic, x86_64: built
rtl8812au, 5.2.20.2, 4.15.0-42-generic, x86_64: built
rtl8812au, 5.2.20.2, 4.15.0-43-generic, x86_64: built
rtl8812au, 5.2.20.2, 4.15.0-45-generic, x86_64: built
rtl8812au, 5.2.20.2, 4.15.0-46-generic, x86_64: built
rtl8812au, 5.2.20.2, 4.15.0-47-generic, x86_64: built
rtl8812au, 5.2.20.2, 4.18.0-18-generic, x86_64: built
rtl8812au, 5.3.4, 4.15.0-47-generic, x86_64: built
rtl8812au, 5.3.4, 4.15.0-48-generic, x86_64: built
rtl8812au, 5.3.4, 4.18.0-18-generic, x86_64: built
rtl8812au, 5.3.4, 5.0.0-13-generic, x86_64: built
rtl8812au, 5.3.4, 5.0.0-17-generic, x86_64: installed
rtl8812au, 5.3.4, 5.0.0-19-generic, x86_64: installed
rtl8812au, 5.3.4, 5.0.0-20-generic, x86_64: installed
rtl8812au, 5.3.4, 5.0.0-21-generic, x86_64: installed


Do you know what could be wrong?. Thanks in advance!

[lubuntu] Qualcomm Atheros AR9285 Wireless - Wifi Connection stopped working

$
0
0
Hi,):P

Wifi connection stopped working on my laptop. The applet shows that Wifi is disabled and does not detect any Wifi connections even when I enable it.
Followed instructions on "Before Posting" thread and ran the Pastebin script. The machine has Qualcomm Atheros AR9285 Wireless Network Adapter

This is the pastebin URL after running the script

http://paste.ubuntu.com/p/rNvcmYFm79/

Please help with this.

Thank You.

[ubuntu] No sign of T-Link Archer T9UH USB wireless adapter on Ubuntu 18.04.2 LTS

$
0
0
Hi,
This is the first time I'm posting on a forum as I usually get my answers by looking at other people's posts. I am new to linux and am in over my head. I installed Ubuntu and all is fine except that my wifi adapter is nowhere to be seen! I've tried a whole host of possible solutions and it made no difference. I really don't want to go back to windows but it seems like the only option at this point. I foolishly decided to start doing all of this while I have 3 assignments due for university so this has been stressing me out very much. I've attempted to install the drivers: rtl8814au and rtl8812au in many different ways to no avail.

Here is my paste bin: http://paste.ubuntu.com/p/bT6fCKpC4x/

When I run dmesg:

[ 1297.717849] usb 1-1: new high-speed USB device number 6 using xhci_hcd
[ 1297.866220] usb 1-1: New USB device found, idVendor=2357, idProduct=0106, bcdDevice= 0.00
[ 1297.866226] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1297.866230] usb 1-1: Product: 802.11ac NIC
[ 1297.866234] usb 1-1: Manufacturer: Realtek
[ 1297.866237] usb 1-1: SerialNumber: 123456

These are the last couple of lines. Is this referring to my adapter??

I apologize if I made any annoying mistakes in this post. I read the sticky thread beforehand and tried to follow it as best I could. Thank you in advance.

UPDATE:
The pastebin from above is from a new install, after realizing that I hadnt downloaded the drivers in the new ubuntu install I followed:

https://askubuntu.com/questions/1057...ess-im-running

And now everything is working somehow.

However, the command "lsusb" still does not seem to show the connection with my adapter:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1532:002e Razer USA, Ltd RZ01-0058 Gaming Mouse [Naga]
Bus 001 Device 004: ID 0c45:7603 Microdia
Bus 001 Device 002: ID 2357:0106
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Anyone have any idea why?

[ubuntu] IP changes automatically

$
0
0
Hi guys,

i dont know why, but every time I turn on my ubunto (18.04), it changes my ip and goes to an IP in America ( I live in Tehran)

do you have any idea how I can prevent it?

Thanks

Problem connecting via ssh

$
0
0
There are two hosts:
Host a running ubuntu 16.4
Host b running ubunto 18.4

I can ssh from a to b without problems.

However, when I try on b ssh user@a, I am asked for the password and provide it.
Then the connection is immediately terminated.
The password is correct: I tried to give a false one and get an appropriate error message.
The correct one is accepted; then I am immediately back to the shell in b.

Any ideas?

[ubuntu] uninstalled Pi Hole, now getting 'temporary failure in name resolution

$
0
0
I installed DoH and Pi Hole on my laptop using this guide: https://docs.pi-hole.net/guides/dns-over-https/
then I decided to buy a Raspberry Pi 4 and install Pi Hole on that.
I then tried to remove cloudflared and Pi Hole from my laptop but now the networking isn't working.
The gui tools show I'm getting IP address and DNS servers correctly from my router, but when I ping I get error "Temporary failure in name resolution", VNC Server isn't connecting, can't run apt update, my browser can't load webpages, etc.

I found that /etc/resolv.conf had this line "nameserver 127.0.0.1" and I changed it to "nameserver 1.1.1.1" and that got things working. But my understanding is that this is temporary until the next reboot when that file gets automatically overwritten.

any ideas how to get the network working again, permanently?

[ubuntu] Wi-Fi troubleshoot

$
0
0
Can you guys help out? Wired connection working, wi-fi not:
http://paste.ubuntu.com/p/RMs4dthykB/

Modem is a Tp-Link, if u need the model I'll take it down from it is currently positioned to check.

edit: sorry gonna have to put this on hold and post another troubleshoot as this one is from the modem on the ground floor of the building (and its wi-fi is working) while the other network on a different floor fails to connect wired as well so I'll try the 'No internet - GUI Method'

[xubuntu] Script to back up to external hard drive on Windows computer

$
0
0
My wife's Win 10 computer has USB 3 ports, but my desktop has only USB 2 ports, and I'm not able to add a USB 3 port to it. I back up to an external hard drive, and that's always worked fine; it's just a little slow. The trouble is I recently had to replace one of our external HDs, and I took the opportunity to replace it with a portable drive. Trouble is, that runs VERY slow on my computer (I guess USB 2 ports don't put out enough power and the throughput suffers). By very slow I mean that instead of a few hours, it literally took 3 days to back up my data.

A good workaround would be to back up over the network--we have gigabit ethernet, so that should work fine. I'm having trouble with the backup script though. It's an .sh file, and the commands look like this:
Code:

cp -r -f ~/Downloads /run/user/1000/gvfs/smb-share:server=sarah,share=backupdrive/Leon
The only trouble is that I can't get it to run with my wife's credentials. I've been trying su, but can't seem to get it to take her password. Does anyone know what syntax I can use? Something like:
Code:

sudo -l username -passwd 1234
cp -r -f ~/Downloads /run/user/1000/gvfs/smb-share:server=sarah,share=backupdrive/Leon

[server] Need help with redirecting qbittorrent-nox webUI

$
0
0
In my college network, they block all access except HTTP/https that make me unable to access my home server via ssh or vpn. So I installed shellinabox in my home server and use apache <Location /shell> to redirect to the shellinabox server listening on port 8022. I do the same thing with qbittorrent-nox(<Location /torrent>, server on port 28080), but only the redirect of shellinabox work. With qbittorrent, I can load the webUI page, but it only displays text.
Can you guy help me what wrong with my qbittorrent config, please!
Thanks in advance!
Sorry for my bad English!


/etc/apache2/sites-available/torrent.conf
Code:

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
        ServerAdmin webmaster@localhost
        ServerName mynoipaddr.ddns.net/torrent
        ErrorLog ${APACHE_LOG_DIR}/torrent-error.log
        CustomLog ${APACHE_LOG_DIR}/torrent-access.log combined
        SSLEngine on
        SSLProxyEngine on
        SSLCertificateFile    /etc/apache2/ssl/apache.crt
        SSLCertificateKeyFile /etc/apache2/ssl/apache.key
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>
    </VirtualHost>
    <Location /torrent>
        ProxyPass http://localhost:28080
        Order allow,deny
        Allow from all
    </Location>
    Redirect permanent /torrent http://192.168.1.102:28080
</IfModule>

/var/log/torrent-error.log
Code:

[Tue Jul 30 20:14:25.579196 2019] [ssl:warn] [pid 9793:tid 140178661270656] AH01906: mynoipaddr.ddns.net/torrent:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Jul 30 20:14:25.579321 2019] [ssl:warn] [pid 9793:tid 140178661270656] AH01909: mynoipaddr.ddns.net/torrent:443:0 server certificate does NOT include an ID which matches the server name
[Tue Jul 30 20:14:25.597545 2019] [ssl:warn] [pid 9795:tid 140178661270656] AH01906: mynoipaddr.ddns.net/torrent:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Jul 30 20:14:25.597581 2019] [ssl:warn] [pid 9795:tid 140178661270656] AH01909: mynoipaddr.ddns.net/torrent:443:0 server certificate does NOT include an ID which matches the server name

And the console log of firefox
Code:

.
.
The script from “https://mynoipaddr.ddns.net/scripts/misc.js?locale=en” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
The script from “https://mynoipaddr.ddns.net/scripts/lib/mootools-1.2-core-yc.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
Loading failed for the <script> with source “https://mynoipaddr.ddns.net/scripts/lib/mootools-1.2-core-yc.js”. torrent:16:1
The script from “https://mynoipaddr.ddns.net/scripts/lib/mootools-1.2-more.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
Loading failed for the <script> with source “https://mynoipaddr.ddns.net/scripts/lib/mootools-1.2-more.js”. torrent:17:1
The script from “https://mynoipaddr.ddns.net/scripts/lib/mocha-yc.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
Loading failed for the <script> with source “https://mynoipaddr.ddns.net/scripts/lib/mocha-yc.js”. torrent:21:1
The script from “https://mynoipaddr.ddns.net/scripts/mocha-init.js?locale=en” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type. torrent
.
.
Content Security Policy: The page’s settings blocked the loading of a resource at data:application/font-woff2;charset=utf-… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:application/font-woff;charset=utf-8… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:font/woff;base64,d09GRgABAAAAAJAgAB… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:font/woff;base64,d09GRgABAAAAAI7sAB… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:application/font-woff2;charset=utf-… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:application/font-woff;charset=utf-8… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:font/woff;base64,d09GRgABAAAAAJAgAB… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:font/woff;base64,d09GRgABAAAAAI7sAB… (“default-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at data:font/woff;base64,d09GRgABAAAAAIw4AB… (“default-src”)
.
.


[ubuntu] Intel 7260 Wireless RFKILL Hard

$
0
0
I have a Stinger R6 cart (medical) that we are trying to run Ubuntu on to make it into a thin client. We have tried several flavors of Ubuntu including the vanilla distribution and they all work fine with wired networking, but not wireless. It appears that something is setting the driver to think that there is a hardware switch putting the wireless into airplane mode. We have literally taken apart this unit and cannot find any switches, jumpers or UEFI/BIOS settings that would control the wireless. Also the keyboard is a standard USB keyboard with no FN wireless keys. Other posts have suggested running the following command:
Code:

sudo -i echo 0 > /sys/class/rfkill/rfkill0/hard
Unfortunately, even after chmod to 777 we get an access denied message.

I've run the wireless-info script and the results are at http://paste.ubuntu.com/p/PFHg6Kdfbm/

The same equipment works fine under Windows 7 and Windows 10 with the standard Intel drivers.

Thanks for any help you can provide.

[ubuntu] Unable to use remote x11vnc on a ssh tunnel

$
0
0
I want to connect to my desktop at work via vnc. Here how I did:
  • On the remote machine I ran:
    Code:

    autossh -M 8081 -NR  2222:localhost:22 -p3082 censor@censor.sytes.net
  • On local machine I ran:
    Code:

    ssh -vvv -NL 5900:localhost:5900 work

define work in .ssh/config
Code:

Host work
    Hostname localhost
    User censor
    Port 2222

And start x11vnc server
Code:

export DISPLAY=:0
x11vnc

When use remmina connect to address localhost:5900 it just flash then disappear.
The log of the x11vnc
Code:

24/07/2019 16:23:40 Got connection from client 127.0.0.1
24/07/2019 16:23:40  other clients:
24/07/2019 16:23:40 Normal socket connection
24/07/2019 16:23:40 Disabled X server key autorepeat.
24/07/2019 16:23:40  to force back on run: 'xset r on' (3 times)
24/07/2019 16:23:40 incr accepted_client=1 for 127.0.0.1:33082  sock=11
24/07/2019 16:23:40 Client Protocol Version 3.8
24/07/2019 16:23:40 Protocol version sent 3.8, using 3.8
24/07/2019 16:23:40 rfbProcessClientSecurityType: executing handler for type 1
24/07/2019 16:23:40 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
24/07/2019 16:23:41 Pixel format for client 127.0.0.1:
24/07/2019 16:23:41  8 bpp, depth 8
24/07/2019 16:23:41  true colour: max r 7 g 7 b 3, shift r 0 g 3 b 6
24/07/2019 16:23:41 copy_tiles: allocating first_line at size 61
24/07/2019 16:23:41 rfbProcessClientNormalMessage: ignoring unsupported encoding type ultraZip
24/07/2019 16:23:41 Using compression level 9 for client 127.0.0.1
24/07/2019 16:23:41 Using image quality level 0 for client 127.0.0.1
24/07/2019 16:23:41 Using JPEG subsampling 1, Q15 for client 127.0.0.1
24/07/2019 16:23:41 Enabling X-style cursor updates for client 127.0.0.1
24/07/2019 16:23:41 Enabling full-color cursor updates for client 127.0.0.1
24/07/2019 16:23:41 Enabling cursor position updates for client 127.0.0.1
24/07/2019 16:23:41 Enabling KeyboardLedState protocol extension for client 127.0.0.1
24/07/2019 16:23:41 Enabling NewFBSize protocol extension for client 127.0.0.1
24/07/2019 16:23:41 Enabling LastRect protocol extension for client 127.0.0.1
24/07/2019 16:23:41 Enabling SupportedMessages protocol extension for client 127.0.0.1
24/07/2019 16:23:41 Enabling SupportedEncodings protocol extension for client 127.0.0.1
24/07/2019 16:23:41 Enabling ServerIdentity protocol extension for client 127.0.0.1
24/07/2019 16:23:41 Using tight encoding for client 127.0.0.1
24/07/2019 16:23:41 client_count: 0
24/07/2019 16:23:41 Restored X server key autorepeat to: 1
24/07/2019 16:23:41 viewer exited.
24/07/2019 16:23:41 deleted 60 tile_row polling images.

Log of ssh -vvv:
Code:

debug1: Connection to port 5900 forwarding to localhost port 5900 requested.
debug2: fd 9 setting TCP_NODELAY
debug2: fd 9 setting O_NONBLOCK
debug3: fd 9 is O_NONBLOCK
debug1: channel 5: new [direct-tcpip]
debug3: send packet: type 90
debug3: receive packet: type 91
debug2: channel 5: open confirm rwindow 2097152 rmax 32768
debug2: channel 5: window 1992972 sent adjust 104180
debug2: channel 5: read<=0 rfd 9 len -1
debug2: channel 5: read failed
debug2: channel 5: close_read
debug2: channel 5: input open -> drain
debug2: channel 5: ibuf empty
debug2: channel 5: send eof
debug3: send packet: type 96
debug2: channel 5: input drain -> closed
debug3: receive packet: type 96
debug2: channel 5: rcvd eof
debug2: channel 5: output open -> drain
debug2: channel 5: obuf empty
debug2: channel 5: close_write
debug2: channel 5: chan_shutdown_write: shutdown() failed for fd 9: Transport endpoint is not connected
debug2: channel 5: output drain -> closed
debug3: receive packet: type 97
debug2: channel 5: rcvd close
debug3: channel 5: will not send data after close
debug2: channel 5: send close
debug3: send packet: type 97
debug2: channel 5: is dead
debug2: channel 5: garbage collecting
debug1: channel 5: free: direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36686 to 127.0.0.1 port 5900, nchannels 6
debug3: channel 5: status: The following connections are open:
  #2 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36662 to 127.0.0.1 port 5900 (t4 r0 i0/0 o3/0 fd 6/6 cc -1)
  #3 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36664 to 127.0.0.1 port 5900 (t4 r1 i0/0 o3/0 fd 7/7 cc -1)
  #4 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36666 to 127.0.0.1 port 5900 (t4 r2 i0/0 o3/0 fd 8/8 cc -1)
  #5 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36686 to 127.0.0.1 port 5900 (t4 r3 i3/0 o3/0 fd 9/9 cc -1)

debug1: Connection to port 5900 forwarding to localhost port 5900 requested.
debug2: fd 9 setting TCP_NODELAY
debug2: fd 9 setting O_NONBLOCK
debug3: fd 9 is O_NONBLOCK
debug1: channel 5: new [direct-tcpip]
debug3: send packet: type 90
debug3: receive packet: type 92
channel 5: open failed: connect failed: Connection refused
debug2: channel 5: zombie
debug2: channel 5: garbage collecting
debug1: channel 5: free: direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36688 to 127.0.0.1 port 5900, nchannels 6
debug3: channel 5: status: The following connections are open:
  #2 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36662 to 127.0.0.1 port 5900 (t4 r0 i0/0 o3/0 fd 6/6 cc -1)
  #3 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36664 to 127.0.0.1 port 5900 (t4 r1 i0/0 o3/0 fd 7/7 cc -1)
  #4 direct-tcpip: listening port 5900 for localhost port 5900, connect from 127.0.0.1 port 36666 to 127.0.0.1 port 5900 (t4 r2 i0/0 o3/0 fd 8/8 cc -1)

What did I do wrong?

[ubuntu] Installation of wireless usb adapter

$
0
0
In one of my UBUNTU 14.04 desktops, it is not possible to connect with cable internet. Therefore, I purchased a iBall Wireless USB Adapter with an intention to connect the PC through Mobile Hotspot. With the installation CD so provided, I failed to install the driver etc. How do I configure the adapter to make it work?

Can't connect through any IP ports

$
0
0
Hi,

I've got this very strange problem. I have 3 computers: 10.0.0.1, 2 & 3.

10.0.0.1 cannot connect to 10.0.0.2 through port 5984
10.0.0.1 can connect to 10.0.0.3 through port 5984

10.0.0.2 can connect to 10.0.0.1 through port 5984
10.0.0.2 can connect to 10.0.0.3 through port 5984

10.0.0.3 can connect to 10.0.0.1 through port 5984
10.0.0.3 cannot connect to 10.0.0.2 through port 5984

So the problem seems to be with 10.0.0.2 blocking port connections, however, everyone can ping each other no problem. (In the title I say all ports because I couldn't get 2 & 3 to talk to each other using sshfs and I tried various ports to no avail.)

If anyone can provide some hints how to troubleshoot the situation I'd be grateful.

Printer Cleaning using Windows through Samba

$
0
0
Hi everyone,

If I connect my printer to an ubuntu machine running CUPS and SAMBA, and share the printer to the network, will my windows PC be able to access the printer and use the manufacturer's windows-based tools to clean the printer head? My current problem is that the drivers that run on my linux devices don't have the cleaning utilities that is available in windows, so I still need to hook up the printers to a windows machine to run maintenance programs. We have a lot of printers in the organization.
Viewing all 23300 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>