Moderators: sidsoft, Moderators
equo updatesu
mkdir /var/lib/entropy/client/database
mkdir /var/lib/entropy/client/database/x86
mkdir /var/lib/entropy/client/database/x86/sabayonlinux.org
mkdir /var/lib/entropy/client/database/x86/sabayonlinux.org/standard
mkdir /var/lib/entropy/client/database/x86/sabayonlinux.org/standard/x86
mkdir /var/lib/entropy/client/database/x86/sabayonlinux.org/standard/x86/5equo install --nodeps pptpclient# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1c:c4:c6:48:de
inet addr:172.16.170.2 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::21c:c4ff:fec6:48de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1319760 errors:0 dropped:0 overruns:0 frame:0
TX packets:1045746 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1027469515 (979.8 MiB) TX bytes:315785612 (301.1 MiB)
Memory:e4600000-e4620000
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:1750 errors:0 dropped:0 overruns:0 frame:0
TX packets:1750 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:106644 (104.1 KiB) TX bytes:106644 (104.1 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:91.214.139.44 P-t-P:91.198.249.129 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1460 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:135 (135.0 B) TX bytes:169 (169.0 B)
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
91.198.249.129 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 172.16.0.1 0.0.0.0 UG 4003 0 0 eth0
0.0.0.0 91.198.249.129 0.0.0.0 UG 4003 0 0 ppp0
route del default
route del default
route add default gw 91.198.249.129pppd call corbina debug nodetach

Однако, методом проб и ошибок было установлено, что если после поднятия впн прописать маршруты до днс через реальный ип:
Код
route add 87.224.197.1 gw 90.157.40.159
route add 87.224.213.1 gw 90.157.40.159
А потом прописать маршрут до внешнего ресурса через 172.30.0.1:
Код
route add ya.ru gw 172.30.0.1route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.1 10.0.36.1 255.255.255.255 UGH 0 0 0 eth0
10.0.0.1 10.0.36.1 255.255.255.255 UGH 0 0 0 eth0
172.30.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.0.36.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
*Bringing up interface eth0
* 10.0.36.82 ...
RTNNETLINK answers: File exists
* ERRORS: net.eth0 failed to start
* ERRORS: cannot start net.ppp0 as net.eth0 would not start# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:77:48:84:d7
inet addr:10.0.36.82 Bcast:10.0.36.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12631 errors:0 dropped:0 overruns:0 frame:0
TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes: 932732(910.8 KiB) TX bytes: 8034(7.8 KiB)
Interrupt:18 Base address:0xe800
eth1 (тоже саме что и у eth0 только без второй строчки и без кб)
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:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3208 (3.1 KiB) TX bytes:3208 (3.1 KiB)
cat /etc/init.d/net.ppp0
config_eth0=("10.0.36.82 netmask 255.255.255.0 brd 10.0.36.255")
# здесь я трафик на все наши подсетки 10.xxx.xxx.xxx направил через свой шлюз:
routes_eth0=("10.0.0.1 via 10.0.36.1")
config_ppp0=("ppp")
link_ppp0="pty 'pptp 10.0.0.1 --nolaunchpppd'"
username_ppp0='логин'
password_ppp0='пароль'
pppd_ppp0=(
debug
lock
deflate 0
defaultroute
mtu 1500
mru 1500
nobsdcomp
persist # пускай демон сам пересоединяется в случае обрыва соединения
)
depend_ppp0() {
need net.eth0
}
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
172.16.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
91.198.249.129 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.16.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
/etc/init.d/NetworkManager stop/etc/init.d/net.eth0 restart
/etc/init.d/net.ppp0 start# /etc/init.d/net.ppp0 start
Bringing up interface ppp0
Starting pppd in ppp0
/lib/rc/net/pppd.sh: eval: line 203: unexpected EOF while looking for matching ' "
/lib/rc/net/pppd.sh: eval: line 204: syntax error: unexpected end of file
/lib/rc/net/pppd.sh: line 204: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires
Failed to start PPP
ERROR: net.ppp0 failed to start
eval start-stop-daemon --start --exec /usr/sbin/pppd \
--pidfile "/var/run/ppp-${IFACE}.pid" -- "${opts}" >/dev/null


Users browsing this forum: No registered users and 1 guest