S
S
Skywalker732016-01-29 14:58:20
linux
Skywalker73, 2016-01-29 14:58:20

How to add a route to a subnet behind a pptp tunnel?

There is a vps on Debian with a configured Softether vpn server. Everything works, it gives Internet to clients, there is a locale (192.168.*.*.)
Required: Establish a pptp client connection and access subnets in the tunnel (10.*.*.*) so that vpn server clients have access to these subnets.
I add a route:

/sbin/route add -net 10.250.0.0 netmask 255.255.255.0 dev ppp0

get
SIOCADDRT: No such device
my configs:
ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:74:98:28
          inet addr:123.123.123.123  Bcast:123.123.123.123  Mask:255.255.255.0
          inet6 addr: "тут ип6 адресс"/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:961866588 errors:0 dropped:0 overruns:0 frame:0
          TX packets:626673922 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76731049410 (71.4 GiB)  TX bytes:56301486810 (52.4 GiB)

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:16436  Metric:1
          RX packets:3359119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3359119 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:516840052 (492.8 MiB)  TX bytes:516840052 (492.8 MiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:123.123.123.123  P-t-P:10.255.254.0  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1496  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:50 (50.0 B)  TX bytes:56 (56.0 B)


tap_1     Link encap:Ethernet  HWaddr 00:ac:44:0f:00:d2
          inet addr:192.168.30.1  Bcast:192.168.30.255  Mask:255.255.255.0
          inet6 addr: "тут ип6 адрес"/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8143988 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10803648 errors:0 dropped:0 overruns:79 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:1511135951 (1.4 GiB)  TX bytes:5773691940 (5.3 GiB)

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         aa.bb.cc.1    0.0.0.0         UG    0      0        0 eth0
10.255.254.0    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
ип.адрес.впн.сервера   123.123.123.123    255.255.255.255 UGH   0      0        0 eth0
aa.bb.cc.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 tap_1

options.pptp
lock

noauth

refuse-pap
refuse-eap
refuse-chap
refuse-mschap

nobsdcomp
nodeflate

config /etc/ppp/peers/myvpn
pty "pptp "адрес сервера" --nolaunchpppd"
name %user%
remotename %адрес сервера%
file /etc/ppp/options.pptp
ipparam myvpn
persist
nodefaultroute
require-mppe-128

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Олег Nerwin, 2016-01-29
@Nerwin

делайте маршрут не через dev, а указывая gw 10.255.254.0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question