PPTP refusing to connect when client is windows - linux

I have a PPTP server running and I can connect to it from linux. When I try from windows 7 (2 instances tested) it fails. Here's the syslog for such a conn:
pptpd[540]: CTRL: Client 109.xxx.158.201 control connection started
pptpd[540]: CTRL: Starting call (launching pppd, opening GRE)
pppd[541]: Plugin radius.so loaded.
pppd[541]: RADIUS plugin initialized.
pppd[541]: Plugin radattr.so loaded.
pppd[541]: RADATTR plugin initialized.
pppd[541]: pppd 2.4.5 started by root, uid 0
pppd[541]: Using interface ppp0
pppd[541]: Connect: ppp0 <--> /dev/pts/1
pptpd[540]: GRE: Bad checksum from pppd.
pppd[541]: LCP: timeout sending Config-Requests
pppd[541]: Connection terminated.
pppd[541]: Modem hangup
pppd[541]: Exit.
pptpd[540]: GRE: read(fd=6,buffer=6075a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
pptpd[540]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
pptpd[540]: CTRL: Reaping child PPP[541]
pptpd[540]: CTRL: Client 109.xxx.158.201 control connection finished
I played with the mtu and ranged it from 900 to 1500 with no success. My pptp options:
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
nodefaultroute
lock
nobsdcomp
ms-dns 10.10.0.1
noipx
mtu 1404
mru 1404
Remember! Linux client connects so ports and protocols should be enabled.
tcpdump -i eth0 port 1723 or proto 47 shows the following gist:
https://gist.github.com/ciokan/5595640
where 109.xxx.158.201 is me, the client.
No firewalls on client. Everything disabled. Im not a network admin and I can't understand jack from that tcpdump. HALP :)

Related

Rdma infiniband cannot open hosts (iberror: discovery failed) Port state: Down

I am facing an issue while configuring rdma and Infiniband on my two nodes. Both of these two nodes are connected and I have installed the recommended software libraries and packages required.
But my port status is down and physical state is Disabled. I tried to enable the state but I get the error of can’t open MAD PORT
:~# ibportstate -L 1 3 enable
ibwarn: [6772] mad_rpc_open_port: can't open UMAD port ((null):0)
ibportstate: iberror: failed: Failed to open '(null)' port '0'
Infiniband ibstatus returns this:
Infiniband device ‘mlx5_0’ port 1 status:
default gid: fe80:0000:0000:0000:1270:fdff:fe6e:43e0
base lid: 0x0
sm lid: 0x0
state: 1: DOWN
phys state: 3: Disabled
rate: 100 Gb/sec (4X EDR)
link_layer: Ethernet
I don't understand what seems to be the issue here, I also upgraded the firmware but still the problem persists.
I figured it out and I am sharing the answers for others to see so the issue was the network interface, you need to see which network interface the Infiniband and check the status.
root#dtn0:~# /etc/init.d/openibd status
HCA driver loaded
Configured Mellanox EN devices:
ens11np0
Currently active Mellanox devices:
The following OFED modules are loaded:
rdma_ucm
rdma_cm
ib_ipoib
mlx5_core
mlx5_ib
ib_uverbs
ib_umad
ib_cm
ib_core
mlxfw
After that, I just assigned Ip and netmask on the interface and I was able to use the interface and reach the network.
root#dtn0:~# ifconfig ens11np0 10.0.0.50/24

How to read BLE Advertising Packets without pairing

I need to read advertising packets from BLE sensors that broadcast temperature in an advertising packet every 5 seconds. I was told by the manufacturer that packet will be a GAP Scan Response Event and that I don't have to connect to the device to read this packet.
The sensor's MAC address shows up when I run sudo hcitool lescan
However, when I run sudo gatttool -I -t random -b 06:09:16:41:87:DB this happens:
[06:09:16:41:87:DB][LE]> connect
Attempting to connect to 06:09:16:41:87:DB
Error: connect error: Connection refused (111)
Also when I run sudo gatttool -b 06:09:16:41:87:DB -I and connect, I get:
Error: connect error: Transport endpoint is not connected (107)
How can I read this advertising packet if I am unable to make a Bluetooth connection via gatttool?
Well, if you want to listen to advertising events then you shouldn't connect since advertisements are broadcast. You should just scan. If you use the debugging tools "hcitool lescan" and "sudo btmon" in a separate terminal concurrently then you should see the scan response data.

CentOS 7 USB. Connect to Wi-Fi using CLI only

I just installed CentOS 7 [Kernel 3.10.0-514] on my USB stick.
Operating system works fine but I had some problems with my Broadcom 43227 wireless card.
I downloaded driver, patched it, changed code a bit according to the instruction here: https://wiki.centos.org/HowTos/Laptops/Wireless/Broadcom and after many attempts it finally compilled and after loading the driver module into kernel led turned on.
Now I need to connect to my Wi-Fi.
What am I trying to do:
Get wireless interface name using iw dev:
phy#0
Interface wlp2s0
Scan to find WiFi Network using iw wlp2s0 scan | grep SSID
SSID: MyNetworkName
Generate a WPA/WPA2 configuration file using wpa_passphrase MyNetworkName >> /etc/wpa_supplicant.conf
MyNetworkPassword
Connect to WPA/WPA2 WiFi network using wpa_supplicant -B -D wext -i wlp2s0 -c /etc/wpa_supplicant.conf
Successfylly initialized wpa_supplicant
[and in some cases after few minutes]
ERROR #wl_cfg80211_scan: WLC_SCAN error (-22)
Get an IP using dhclient using dhclient wlp2s0
But nohing happens
Ping command : Name or sarvice not known
If I run wpa_supplicant without -B I get some repeating errors:
Device or resource busy
wlp2s0: Failed to initiate AP scan
wlp2s0: Trying to associate with [MAC] (SSID='MyNetName' freq=2462 MHz)
Operation not supported
wlp2s0: Association request to the driver failed
....
if I add -D nl80211 to wpa_supplicant call I get same errors without "Device or resource busy"
What I am doing wrong?

HAProxy 1.6 configuration Node.js ssh server child process

I am running a Node.js SSH server that spawns a child process to exec code (using require('child_process').spawn) after successful authentication.
The client server connections works fine on port 22 and connection is kept alive successfully through spawned process.
I am trying to setup up now with HAProxy 1.6, to forward port 22 to a non-privileged port on which the SSH server is listening.
However, when the child process is spawned the server either errors Error: write EPIPE or Error: read ECONNRESET.
This suggests to me there is an issue with prematurely closed stream or connection between the client -> HAProxy -> server?
I am looking at websocket configurations and ssh configurations for HAProxy and various keep alive options. However I cannot get the connection to work.
My configuration:
global
daemon
maxconn 10000
log 127.0.0.1 local0
defaults
log global
option tcplog
option logasap
timeout connect 500s
timeout client 5000s
timeout server 2h
timeout server-fin 5000s
timeout client-fin 5000s
timeout tunnel 1h
option tcpka
frontend sshd
bind *:22
default_backend ssh
timeout client 2h
backend ssh
mode tcp
server ssh2server 127.0.0.1:5000 check port 5000
Any pointers or help would be awesome. Thanks in advance.
EDIT
Runing haproxy in debug mode I have
00000000:sshd.accept(0004)=0005 from [my ip]
00000000:ssh.srvcls[0005:0006]
00000000:ssh.clicls[0005:0006]
00000000:ssh.closed[0005:0006].
On the tcplog
Oct 15 15:15:38 localhost haproxy[16036]: 128.277.13.23:51146 [15/Oct/2016:15:15:38.804] sshd ssh/ssh2server 1/0/+0 +0 -- 1/1/1/1/0 0/0

Debian: cannot create rfcomm0

On Debian Jessie 8.2:
I'm trying to create the following device: /dev/rfcomm0 in order to connect my arduino via bluetooth module HC-05, but no success.
Here are the steps I'm following:
1) I guess my HC-05 called FOO is recognised and properly configured, because
hcitool scan
reports
98:D3:31:xx:xx:xx FOO
xx are just a mask I use here for privacy.
2) I added the file /etc/bluetooth/rfcomm.conf
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 98:D3:31:xx:xx:xx;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "FOO";
}
3) I restarted bluetooth service
sudo /etc/init.d/bluetooth restart
response is:
[ ok ] Restarting bluetooth (via systemctl): bluetooth.service.
Nevertheless device rfcomm0 is not created.
I'm following the instructions here:
Bluetooth serial communication with HC-05
I did this operation months ago on another Linux system (it was ubuntu) and I can remember
evertything went well: the port was created. Probably I'm missing some important step!
Thanks a lot,
Valerio
UPDATE:
this command
sdptool records 98:D3:31:xx:xx:xx
reports
Service Name: Dev B
Service RecHandle: 0x10000
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
I think this confirms that the channel in rfcomm.conf is 1
Ok , thanks to Kaylum this is solved!
The manual binding create the device rfcomm0
sudo rfcomm bind 0 98:D3:31:xx:xx:xx 1
Then, in order to make Processing write/read on the created port,
I needed to run Processing as sudoer, otherwise Processing says that the port exists but is busy. As sudoer, I can confirm that the port correctly sends data back and forth between Arduino and Processing!

Resources