Vpn no logs linux

Ubuntu pppd нету debug информации, как отследить проблему при подключении PPTP?

Пытаюсь на VPS сервере подключится к VPN PPTP. По какой-то причине не происходит подключение. Не происходит логирование.


PPTP / «Microsoft: защищенный пароль (EAP-MSCHAP V2)»

Мои настройки для подключения PPTP VPN

pty «pptp VPN_IP —nolaunchpppd»
refuse-pap
refuse-chap
refuse-eap
require-mschap
require-mschap-v2
require-mppe-128
mppe-stateful
nobsdcomp
nodeflate
novj
noauth
user LOGIN_VPN
password «PASSWORD_VPN»

1. Создал файл с настройками (как указанно выше) по пути /etc/ppp/peers/vpn_name
2. Делаю, как в этой инструкции.

Create a log file to hold output from pppd.
# touch /var/log/pppdebug
Add the following syslog facilities for pppd in /etc/syslog.conf.
daemon.debug;local2.debug /var/log/pppdebug
Restart syslogd.
# pkill -HUP -x syslogd

3. Вызываю
#pppd debug call vpn_name
и ничего не происходит. Пытаюсь понять в чем причина, но не могу найти куда всё debug-логи сохраняются.
#tail -f /var/log/pppdebug — пустота.

Простой 2 комментария

tail -f /var/log/syslog попробуй

AlexVWill, PPTP использую потому-что нет выбора. VPN предоставляет работодатель.

Да, Ваш способ что-то показывает:

May 22 06:24:34 vps51878 pppd[2965]: pppd 2.4.7 started by root, uid 0
May 22 06:24:34 vps51878 pppd[2965]: Couldn’t set tty to PPP discipline: Invalid argument
May 22 06:24:34 vps51878 pppd[2965]: Waiting for 1 child processes.

May 22 06:24:35 vps51878 pptp[2973]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 7 ‘Outgoing-Call-Request’
May 22 06:24:35 vps51878 pptp[2973]: anon log[ctrlp_disp:pptp_ctrl.c:900]: Received Outgoing Call Reply.
May 22 06:24:35 vps51878 pptp[2967]: anon warn[decaps_hdlc:pptp_gre.c:226]: short read (-1): Input/output error
May 22 06:24:35 vps51878 pptp[2967]: anon warn[decaps_hdlc:pptp_gre.c:238]: pppd may have shutdown, see pppd log
May 22 06:24:35 vps51878 pppd[2965]: Script pptp 31.xx.xx.xx —nolaunchpppd finished (pid 2966), status = 0x0
May 22 06:24:35 vps51878 pppd[2965]: Exit.
May 22 06:24:35 vps51878 pptp[2973]: anon log[ctrlp_disp:pptp_ctrl.c:938]: Outgoing call established (call ID 15945, peer’s call ID 18358).
May 22 06:24:35 vps51878 pptp[2973]: anon log[callmgr_main:pptp_callmgr.c:245]: Closing connection (unhandled)
May 22 06:24:35 vps51878 pptp[2973]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 12 ‘Call-Clear-Request’
May 22 06:24:35 vps51878 pptp[2973]: anon log[call_callback:pptp_callmgr.c:84]: Closing connection (call state)

Читайте также:  Alt linux simply linux установка

Пытаюсь понять в чем причина.

С таким же файлом конфигурации VPN (/etc/ppp/peers/vpn_name) на локальной машине получается подключиться. А на VPS нет..

Источник

How can I troubleshoot «VPN Connection Failed»?

Is there anyway to get an error log for a failed VPN connection attempt? All I get is this notification and I have no idea where to go from there.

7 Answers 7

Log is written to /var/log/syslog .
Open gnome-terminal and do sudo tail -f /var/log/syslog
This will follow the file (prints to terminal new log messages).
Now try to connect to the vpn, the messages then will start showing in the terminal.
When you are done following the log just click Ctrl+c to quit tail.

One can add markers to the log by opening another terminal and doing something like that:
logger «. Starting VPN. «

thank you. my username / password were incorrect but all I got was «connection timed out». the logs told me everything I needed to know!

The new (systemd-)variant to get the logs is

journalctl -u NetworkManager.service 

Not only it is a variant, but it includes more information. Only thanks to looking via journalctl , I was able to find an issue with Window VPN. pppd[15094]: MS-CHAP authentication failed: E=649 No dialin permission

In Fedora and other systemd distro’s that do not have /var/log/syslog, the VPN logs can be accessed with «sudo journalctl -f»

I’d suggest that that isn’t really relevant as this is «askubuntu», but Ubuntu is migrating to systemd, too, and while they’ll probably always have /var/log/syslog (its existence is independent of systemd, and I doubt Fedora used it before systemd), journalctl is always the correct way to view the log on systemd.

Читайте также:  Linux create desktop entry

What kind of VPN are you trying to establish?

Is it PPTP (Microsoft proprietary) or Cisco-compatible ?

The easiest way would be for you to run pptp (for PPTP) or vpnc (for Cisco) from a console and see the possible errors interactively.

I think that vpnc is quite straight forward, you just need to type in the necessary info (gateway ip, group name/pass, user name/pass).

I haven’t actually used a PPTP VPN, but some info about setting it up can be found here at cyberciti

Источник

Where are the OpenVPN connection logs and configuration files?

I have problem connecting to OpenVPN server. Where are OpenVPN log files and how do I find the connection details?

in general, you can found configuration files on /etc/openvpn/ there was contained log files and your openVPN configuration

5 Answers 5

If you are using the network manager plugin (network-manager-openvpn), look into /var/log/syslog

This should give you the last logs of openvpn:

Connection details are to be found in /etc/openvpn/

This was good in 2014 and searches might lead to here. In 2021, many distros switched to systemd and the logs are accessible via journalctl, see askubuntu.com/questions/885383/….

grep vpn -i /var/log/syslog is better to use. grep is case-sensitive by default and in my case it was missing an important warning : Jan 11 22:12:06 blablabla-nix nm-openvpn[3890]: WARNING: Your certificate has expired!

By default, in most distros, OpenVPN log output goes to the syslog, which is usually at /var/log/syslog

However, your config files can set the logfile location explicitly, e.g.:

log-append /var/log/openvpn.log 

This works for both OpenVPN clients and servers. OpenVPN config files are usually located in /etc/openvpn and usually named *.conf . server.conf is canonical; client config filenames are usually like .conf .

Читайте также:  Ubuntu linux operating systems

Log file location

On servers, OpenVPN is usually run as a system service, i.e., started with the —daemon option. According to the OpenVPN man page, using the —daemon [progname] option has the following effect:

Become a daemon after all initialization functions are completed. This option will cause all message and error output to be sent to the syslog file (such as /var/log/messages ), except for the output of scripts and ifconfig commands, which will go to /dev/null unless otherwise redirected. The syslog redirection occurs immediately at the point that —daemon is parsed on the command line even though the daemonization point occurs later. If one of the —log options is present, it will supercede (sic) syslog redirection.

Use either of the —log file or —log-append file options if you want OpenVPN messages to be logged to a different file. The —log option causes the specified log file to be over-written each time the OpenVPN daemon starts while the —log-append option adds new entries to the log file. These options can also be set in the OpenVPN configuration file, e.g.,

Verbosity

The —verb option can be used to set the log file verbosity from 0 (no output except for fatal errors) to 11 (for maximum debugging information). The man page specifies levels of 1 to 4 as the appropriate range for normal usage. This behaviour can be set in the OpenVPN configuration file, e.g.,

Источник

Оцените статью
Adblock
detector