Estou tentando configurar um servidor PPPoE no meu sistema Ubuntu 14.04 para fins de teste. O servidor e o cliente têm o Ubuntu 14.04 instalado. Eu segui o guia deste site para configurar o servidor.
link
Este é o meu arquivo de interfaces:
# The loopback network interface
auto lo
iface lo inet loopback
# The WAN network interface
auto eth0
# The LAN network interface
auto eth1
iface eth1 inet static
address 192.168.1.254
netmask 255.255.255.0
Meu servidor de nomes:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4
O arquivo secreto:
# Secrets for authentication using CHAP
# client server secret IP addresses
"russo" * "1234" 192.168.1.1
O arquivo de opções do servidor PPPoE:
# PPP options for the PPPoE server
# LIC: GPL
require-chap
login
lcp-echo-interval 10
lcp-echo-failure 2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns
Arquivo do conjunto de endereços IP:
192.168.1.1-20
Então, quando eu executo o servidor PPPoE, executando o seguinte comando:
sudo pppoe-server -C isp -L 192.168.1.254 -p /etc/ppp/allip -I eth1
e configuração NAT
sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
então eu conecto meu cliente usando o comando
sudo pppoeconf
no lado do servidor é assim que meu netstat se parece:
mr@OptiPlex-760:~$ netstat -pr
Kernel-IP-Routentabelle
Ziel Router Genmask Flags MSS Fenster irtt Iface
default router 0.0.0.0 UG 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.88.0 * 255.255.255.0 U 0 0 0 eth0
Esta é uma parte do arquivo syslog:
Jul 10 08:54:35 OptiPlex-760 NetworkManager[987]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Jul 10 08:54:35 OptiPlex-760 pppd[4644]: Using interface ppp0
Jul 10 08:54:35 OptiPlex-760 pppd[4644]: Connect: ppp0 <--> /dev/pts/0
Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Peer russo failed CHAP Session verification
Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Connection terminated.
Jul 10 08:55:06 OptiPlex-760 NetworkManager[987]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jul 10 08:55:06 OptiPlex-760 pppoe[4647]: read (asyncReadFromPPP): Session 7: Input/output error
Jul 10 08:55:06 OptiPlex-760 pppd[4644]: Exit.
Jul 10 08:55:06 OptiPlex-760 pppoe-server[4315]: Session 7 closed for client 68:b5:99:f2:b8:bc (192.168.1.7) on eth1
Jul 10 08:55:06 OptiPlex-760 pppoe-server[4315]: Sent PADT
Jul 10 08:55:24 OptiPlex-760 pppoe-server[4695]: Session 1 created for client 68:b5:99:f2:b8:bc (192.168.1.1) on eth1 using Service-Name ''
Jul 10 08:55:24 OptiPlex-760 pppd[4695]: pppd 2.4.5 started by root, uid 0
Jul 10 08:55:24 OptiPlex-760 pppd[4695]: Using interface ppp0
Jul 10 08:55:24 OptiPlex-760 pppd[4695]: Connect: ppp0 <--> /dev/pts/0
Jul 10 08:55:24 OptiPlex-760 NetworkManager[987]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jul 10 08:55:24 OptiPlex-760 NetworkManager[987]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Jul 10 08:55:24 OptiPlex-760 NetworkManager[987]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Jul 10 08:55:37 OptiPlex-760 pppoe-server[4707]: Session 3 created for client 68:b5:99:f2:b8:bc (192.168.1.3) on eth1 using Service-Name ''
Jul 10 08:55:37 OptiPlex-760 pppd[4707]: pppd 2.4.5 started by root, uid 0
Jul 10 08:55:37 OptiPlex-760 NetworkManager[987]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp1, iface: ppp1)
Jul 10 08:55:37 OptiPlex-760 NetworkManager[987]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp1, iface: ppp1): no ifupdown configuration found.
Jul 10 08:55:37 OptiPlex-760 NetworkManager[987]: <warn> /sys/devices/virtual/net/ppp1: couldn't determine device driver; ignoring...
Jul 10 08:55:37 OptiPlex-760 pppd[4707]: Using interface ppp1
Jul 10 08:55:37 OptiPlex-760 pppd[4707]: Connect: ppp1 <--> /dev/pts/11
mr@OptiPlex-760:~$
No lado do meu cliente, se eu verificar o plog, vejo:
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ plog
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: PPP session is 1
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: Connected to 60:e3:27:05:37:78 via interface eth0
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: Using interface ppp0
Jul 10 08:44:15 wm-HP-EliteBook-2540p pppd[5366]: Connect: ppp0 <--> eth0
Jul 10 08:44:18 wm-HP-EliteBook-2540p pppd[5366]: CHAP authentication succeeded: Access granted
Jul 10 08:44:18 wm-HP-EliteBook-2540p pppd[5366]: CHAP authentication succeeded
Jul 10 08:44:18 wm-HP-EliteBook-2540p pppd[5366]: peer from calling number 60:E3:27:05:37:78 authorized
muhammadarifurrahman@wm-HP-EliteBook
E este é o meu netstat -pr:
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ netstat -pr
Kernel-IP-Routentabelle
Ziel Router Genmask Flags MSS Fenster irtt Iface
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$
Não tenho certeza do que estou fazendo de errado. Qualquer sugestão é muito apreciada.
Este é o resultado ifconfig -a do lado do servidor (no começo):
mr@OptiPlex-760:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:23:ae:7d:f1:07
inet addr:192.168.88.249 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::223:aeff:fe7d:f107/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:669 errors:0 dropped:0 overruns:0 frame:0
TX packets:758 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:205085 (205.0 KB) TX bytes:104319 (104.3 KB)
Interrupt:21 Memory:febe0000-fec00000
eth1 Link encap:Ethernet HWaddr 60:e3:27:05:37:78
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::62e3:27ff:fe05:3778/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:72 errors:0 dropped:3 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6967 (6.9 KB) TX bytes:6664 (6.6 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:387 errors:0 dropped:0 overruns:0 frame:0
TX packets:387 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:32845 (32.8 KB) TX bytes:32845 (32.8 KB)
ppp0 Link encap:Point-to-Point Protocol
POINTOPOINT NOARP MULTICAST MTU:1492 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:66 (66.0 B) TX bytes:0 (0.0 B)
ppp1 Link encap:Point-to-Point Protocol
POINTOPOINT NOARP MULTICAST MTU:1492 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:22 (22.0 B) TX bytes:0 (0.0 B)
mr@OptiPlex-760:~$
Então eu corri o plog no lado do servidor e vi:
mr@OptiPlex-760:~$ plog
Jul 10 11:23:23 OptiPlex-760 pppd[2774]: Peer russo failed CHAP Session verification
Jul 10 11:23:23 OptiPlex-760 pppd[2774]: Connection terminated.
Jul 10 11:23:23 OptiPlex-760 pppd[2774]: Exit.
Em seguida, execute ifconfig -a novamente:
mr@OptiPlex-760:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:23:ae:7d:f1:07
inet addr:192.168.88.249 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::223:aeff:fe7d:f107/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:685 errors:0 dropped:0 overruns:0 frame:0
TX packets:782 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:206458 (206.4 KB) TX bytes:106269 (106.2 KB)
Interrupt:21 Memory:febe0000-fec00000
eth1 Link encap:Ethernet HWaddr 60:e3:27:05:37:78
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::62e3:27ff:fe05:3778/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:106 errors:0 dropped:4 overruns:0 frame:0
TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9081 (9.0 KB) TX bytes:7945 (7.9 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:409 errors:0 dropped:0 overruns:0 frame:0
TX packets:409 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:34067 (34.0 KB) TX bytes:34067 (34.0 KB)
mr@OptiPlex-760:~$
Este é o resultado ifconfig -a do lado do cliente:
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 68:b5:99:f2:b8:bc
inet addr:192.168.88.250 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::6ab5:99ff:fef2:b8bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:98 errors:0 dropped:0 overruns:0 frame:0
TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10413 (10.4 KB) TX bytes:24738 (24.7 KB)
Interrupt:20 Memory:d4700000-d4720000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:194 errors:0 dropped:0 overruns:0 frame:0
TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:27708 (27.7 KB) TX bytes:27708 (27.7 KB)
ppp0 Link encap:Point-to-Point Protocol
POINTOPOINT NOARP MULTICAST MTU:1492 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:0 (0.0 B) TX bytes:22 (22.0 B)
wlan0 Link encap:Ethernet HWaddr 58:94:6b:55:15:04
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$
Acabei de perceber isso:
Quando inicio o PPPoE no servidor e, em seguida, conecto a partir do cliente,
No lado de fora eu recebo:
mr@OptiPlex-760:~$ plog
Jul 10 11:33:05 OptiPlex-760 pppd[3257]: pppd 2.4.5 started by root, uid 0
Jul 10 11:33:05 OptiPlex-760 pppd[3257]: Using interface ppp0
Jul 10 11:33:05 OptiPlex-760 pppd[3257]: Connect: ppp0 <--> /dev/pts/10
E no lado do cliente eu recebo:
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$ plog
Jul 10 11:21:59 wm-HP-EliteBook-2540p pppd[4258]: CHAP authentication succeeded: Access granted
Jul 10 11:21:59 wm-HP-EliteBook-2540p pppd[4258]: CHAP authentication succeeded
Jul 10 11:21:59 wm-HP-EliteBook-2540p pppd[4258]: peer from calling number 60:E3:27:05:37:78 authorized
Depois de 2-3 segundos, no lado do servidor eu recebo:
mr@OptiPlex-760:~$ plog
Jul 10 11:33:18 OptiPlex-760 pppd[3257]: Peer russo failed CHAP Session verification
Jul 10 11:33:18 OptiPlex-760 pppd[3257]: Connection terminated.
Jul 10 11:33:18 OptiPlex-760 pppd[3257]: Exit.
mr@OptiPlex-760:~$
E no lado do cliente:
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: LCP terminated by peer (Authentication failed)
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: Modem hangup
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: Connection terminated.
Jul 10 11:22:09 wm-HP-EliteBook-2540p pppd[4258]: Failed to disconnect PPPoE socket: 114 Operation already in progress
muhammadarifurrahman@wm-HP-EliteBook-2540p:~$