LINUX.ORG.RU
ФорумAdmin

pptp centos 7 Network is unreachable

 ,


0

1

Всем привет, Сразу прошу прощения, если вопрос уже поднимался, но ответа так и не смог найти. Есть сервер с 2-мя сетевыми интерфейсами: enp1s0 - провайдер mtis.by с pptp enp2s0 - локальная сеть CentOS 7 ядро 4.4.1 (ядро такое потому что сервер на 3.10 при перезагрузке зависал, с 4-м таких проблем нет)

Настроен firewalld Проблема в том, что при загрузке сервера не поднимается pptp (как это правильнее делать, так и не нашел 😩, сейчас у меня в /etc/sysconfig/network-scripts/ есть ifcfg-mtis в котором прописано ONBOOT=yes) Настройки pptp: # etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client	server	secret			IP addresses
login	mtis	pass	*
# modprobe ppp_mppe

# /etc/ppp/options.pptp

nobsdcomp
nodeflate
nova
novjccomp

# /etc/ppp/peers/mtis

updetach
remotename mtis
linkname mtis
ipparam mtis
pty "/usr/sbin/pptp 172.16.0.4 --nolaunchpppd --nobuffer --loglevel 0"
name user
password pass
usepeerdns
defaultroute
persist
maxfail 0
holdoff 30
noauth
file /etc/ppp/options.pptp

Но стартует только после ifdown enp1s0 && ifup enp1s0 в противном случае получаешь - Network is unreachable Пробовал отключать NetworkManager, пробовал с его помощью все тоже самое 😩 Подскажите в какую сторону копать? Заранее спасибо.



Последнее исправление: and1 (всего исправлений: 1)

nmcli connection modify mtis connection.autoconnect yes

dada ★★★★★
()
Ответ на: комментарий от and1

Не могу понять, помогите, пож-та, поднял соединение, но интернета нету (вернее открывается только google.by, yandex.ru, youtube.com) Вот настройки соединения: [root@srv ~]# cat /etc/ppp/peers/mtis

updetach
remotename mtis
linkname mtis
ipparam mtis
pty "/usr/sbin/pptp 172.16.0.4 --nolaunchpppd --nobuffer --loglevel 0"
name login
password password
usepeerdns
defaultroute
persist
maxfail 0
holdoff 30
noauth
unit 0
file /etc/ppp/options.pptp
[root@srv ~]# cat /etc/ppp/options.pptp
nobsdcomp
nodeflate
novj
novjccomp
unit 0
[root@srv ~]# cat /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
login    mtis-vpn        password        *
Настройки получаю такие: [root@srv ~]# ip route
default dev ppp0  scope link 
10.0.0.0/24 dev eth1  proto kernel  scope link  src 10.0.0.254 
10.125.0.0/21 dev eth0  proto kernel  scope link  src 10.125.0.27  metric 100 
169.254.0.0/16 dev eth1  scope link  metric 1003 
172.16.0.2 via 10.125.7.254 dev eth0  proto dhcp  metric 100 
172.16.0.4 via 10.125.7.254 dev eth0  src 10.125.0.27 
172.16.0.4 dev ppp0  proto kernel  scope link  src 21.143.133.247

[root@srv ~]# netstat -nr

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 ppp0
10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth1
10.125.0.0      0.0.0.0         255.255.248.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
172.16.0.2      10.125.7.254    255.255.255.255 UGH       0 0          0 eth0
172.16.0.4      10.125.7.254    255.255.255.255 UGH       0 0          0 eth0
172.16.0.4      0.0.0.0         255.255.255.255 UH        0 0          0 ppp0

[root@srv ~]# ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 60:e3:27:71:22:cb brd ff:ff:ff:ff:ff:ff
    inet 10.125.0.27/21 brd 10.125.7.255 scope global dynamic eth0
       valid_lft 42969sec preferred_lft 42969sec
    inet6 fe80::62e3:27ff:fe71:22cb/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 40:8d:5c:50:c9:ed brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.254/24 brd 10.0.0.255 scope global eth1
       valid_lft forever preferred_lft forever
9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet 21.143.133.247 peer 172.16.0.4/32 scope global ppp0
       valid_lft forever preferred_ft forever

and1
() автор топика
Ответ на: комментарий от and1

В логах вот так:

Feb 19 21:11:28 srv pppd[1397]: Using interface ppp0
Feb 19 21:11:28 srv pppd[1397]: Connect: ppp0 <--> /dev/pts/1
Feb 19 21:11:28 srv NetworkManager[813]: <info>  (ppp0): new Generic device (carrier: UNKNOWN, driver: 'unknown', ifindex: 9)
Feb 19 21:11:28 srv pptp[2657]: anon log[main:pptp.c:333]: The synchronous pptp option is NOT activated
Feb 19 21:11:28 srv pptp[2667]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 1 'Start-Control-Connection-Request'
Feb 19 21:11:28 srv pptp[2667]: anon log[ctrlp_disp:pptp_ctrl.c:754]: Received Start Control Connection Reply
Feb 19 21:11:28 srv pptp[2667]: anon log[ctrlp_disp:pptp_ctrl.c:788]: Client connection established.
Feb 19 21:11:29 srv pptp[2667]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 7 'Outgoing-Call-Request'
Feb 19 21:11:29 srv pptp[2667]: anon log[ctrlp_disp:pptp_ctrl.c:873]: Received Outgoing Call Reply.
Feb 19 21:11:29 srv pptp[2667]: anon log[ctrlp_disp:pptp_ctrl.c:912]: Outgoing call established (call ID 0, peer's call ID 33779).
Feb 19 21:11:32 srv pppd[1397]: CHAP authentication succeeded
Feb 19 21:11:32 srv pppd[1397]: CHAP authentication succeeded
Feb 19 21:11:32 srv pppd[1397]: not replacing existing default route via 10.125.7.254
Feb 19 21:11:32 srv pppd[1397]: local  IP address 21.143.133.247
Feb 19 21:11:32 srv pppd[1397]: remote IP address 172.16.0.4
Feb 19 21:11:32 srv pppd[1397]: primary   DNS address 93.125.87.227
Feb 19 21:11:32 srv pppd[1397]: secondary DNS address 93.125.87.228
Feb 19 21:11:33 srv NET[2705]: /etc/sysconfig/network-scripts/ifup-post : updated /etc/resolv.conf
Feb 19 21:12:29 srv pptp[2667]: anon log[logecho:pptp_ctrl.c:692]: Echo Reply received.
Feb 19 21:13:29 srv pptp[2667]: anon log[logecho:pptp_ctrl.c:692]: Echo Request received.
Feb 19 21:13:29 srv pptp[2667]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 6 'Echo-Reply'
Feb 19 21:14:29 srv pptp[2667]: anon log[logecho:pptp_ctrl.c:692]: Echo Request received.
Feb 19 21:14:29 srv pptp[2667]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 6 'Echo-Reply'
Feb 19 21:15:26 srv pptp[2667]: anon log[logecho:pptp_ctrl.c:692]: Echo Request received.
Feb 19 21:15:26 srv pptp[2667]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 6 'Echo-Reply'
Feb 19 21:16:25 srv pptp[2667]: anon log[logecho:pptp_ctrl.c:692]: Echo Request received.
Feb 19 21:16:25 srv pptp[2667]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 6 'Echo-Reply'

Состояние сетевых утилит:

[root@srv ~]# systemctl status network
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: failed (Result: exit-code) since Пт 2016-02-19 21:20:45 MSK; 1min 33s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1169 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
   CGroup: /system.slice/network.service
           ├─1396 pppd lock modem crtscts asyncmap 00000000 defaultroute usepeerdns debug nodetach ipparam mtis linkname mtis call mtis noauth nobsdcomp nodeflate
           ├─2805 /usr/sbin/pptp 172.16.0.4 --nolaunchpppd --nobuffer --loglevel 0
           └─2815 /usr/sbin/pptp 172.16.0.4 --nolaunchpppd --nobuffer --loglevel 0

фев 19 21:22:15 srv pppd[1396]: Using interface ppp0
фев 19 21:22:15 srv pppd[1396]: Connect: ppp0 <--> /dev/pts/1
фев 19 21:22:15 srv pptp[2805]: anon log[main:pptp.c:333]: The synchronous pptp option is NOT activated
фев 19 21:22:15 srv pptp[2815]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 1 'Start-Control-Connection-Request'
фев 19 21:22:15 srv pptp[2815]: anon log[ctrlp_disp:pptp_ctrl.c:754]: Received Start Control Connection Reply
фев 19 21:22:15 srv pptp[2815]: anon log[ctrlp_disp:pptp_ctrl.c:788]: Client connection established.
фев 19 21:22:16 srv pppd[1396]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x37dbca28> <pcomp> <accomp>]
фев 19 21:22:16 srv pptp[2815]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 7 'Outgoing-Call-Request'
фев 19 21:22:16 srv pptp[2815]: anon log[ctrlp_disp:pptp_ctrl.c:873]: Received Outgoing Call Reply.
фев 19 21:22:16 srv pptp[2815]: anon log[ctrlp_disp:pptp_ctrl.c:912]: Outgoing call established (call ID 0, peer's call ID 34879).
[root@srv ~]# systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Пт 2016-02-19 21:20:04 MSK; 2min 25s ago
 Main PID: 810 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           ├─ 810 /usr/sbin/NetworkManager --no-daemon
           └─2770 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-38ccd2cb-1d4c-44d5-b5ae-dad3ea893185-eth0.lease -cf /v...

фев 19 21:22:05 srv NetworkManager[810]: <info>  (eth0): DHCPv4 state changed unknown -> bound
фев 19 21:22:05 srv dhclient[2770]: bound to 10.125.0.27 -- renewal in 21408 seconds.
фев 19 21:22:05 srv NetworkManager[810]: <info>  (eth0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
фев 19 21:22:05 srv NetworkManager[810]: <info>  (eth0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
фев 19 21:22:05 srv NetworkManager[810]: <info>  (eth0): device state change: secondaries -> activated (reason 'none') [90 100 0]
фев 19 21:22:05 srv NetworkManager[810]: <info>  NetworkManager state is now CONNECTED_LOCAL
фев 19 21:22:05 srv NetworkManager[810]: <info>  NetworkManager state is now CONNECTED_GLOBAL
фев 19 21:22:05 srv NetworkManager[810]: <info>  Policy set 'Проводное соединение 1' (eth0) as default for IPv4 routing and DNS.
фев 19 21:22:05 srv NetworkManager[810]: <info>  (eth0): Activation: successful, device activated.
фев 19 21:22:15 srv NetworkManager[810]: <info>  (ppp0): new Generic device (carrier: UNKNOWN, driver: 'unknown', ifindex: 8)

Подскажите в какую сторону копать?

and1
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.