[ ] - [ ] - [ ]

:

-
Marlik
, ( ) pptp , .

, , , , ( smile.gif) )

-

, , .

: IP: 172.31.1.245
: 255.255.254.0
(gateway): 10.64.79.254
DNS1: 91.203.64.2
DNS2: 91.203.64.1

, , :

ifconfig


:


eth0 Link encap:Ethernet HWaddr 00:0A:E4:ED:0D:7D
inet addr:10.64.78.216 Bcast:10.64.79.255 Mask:255.255.254.0
inet6 addr: fe80::20a:e4ff:feed:d7d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:402729 errors:0 dropped:0 overruns:0 frame:0
TX packets:32660 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:91979764 (87.7 MiB) TX bytes:3602127 (3.4 MiB)
Interrupt:23

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:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:376 (376.0 b) TX bytes:376 (376.0 b)


:


ifconfig eth0 10.64.78.216 up
route add default gw 10.64.79.255


, , man , .


IP DNS- /etc/resolv.conf :

, , , , :


[root@localhost ~]# cat /etc/resolv.conf
# 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 91.203.64.2
search garanta.ru


: ,

:


[root@localhost ~]# ping -c 3 garanta.ru
PING garanta.ru (91.203.64.1) 56(84) bytes of data.
64 bytes from ryazan.goto-multinex.ru (91.203.64.1): icmp_seq=1 ttl=61 time=0.481 ms
64 bytes from ryazan.goto-multinex.ru (91.203.64.1): icmp_seq=2 ttl=61 time=0.515 ms
64 bytes from ryazan.goto-multinex.ru (91.203.64.1): icmp_seq=3 ttl=61 time=0.447 ms



nameserver 91.203.64.2
search 91.203.64.1


:


[root@localhost ~]# ping -c 3 172.31.1.245
PING 172.31.1.245 (172.31.1.245) 56(84) bytes of data.
64 bytes from 172.31.1.245: icmp_seq=1 ttl=253 time=0.710 ms
64 bytes from 172.31.1.245: icmp_seq=2 ttl=253 time=4.76 ms
64 bytes from 172.31.1.245: icmp_seq=3 ttl=253 time=3.45 ms

--- 172.31.1.245 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.710/2.976/4.761/1.688 ms
[root@localhost ~]# ping -c 3 10.64.79.254
PING 10.64.79.254 (10.64.79.254) 56(84) bytes of data.
64 bytes from 10.64.79.254: icmp_seq=1 ttl=254 time=3.18 ms
64 bytes from 10.64.79.254: icmp_seq=2 ttl=254 time=1.30 ms
64 bytes from 10.64.79.254: icmp_seq=3 ttl=254 time=1.23 ms

--- 10.64.79.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2007ms
rtt min/avg/max/mdev = 1.235/1.908/3.189/0.906 ms


: vpn- ?

, , , , --, dns- vpn(- ).


route add -host 172.31.1.245 gw 10.64.79.254
route add -host 172.31.1.252 gw 10.64.79.254 #
route add -host 91.203.64.2 gw 110.64.79.254
route add -host 91.203.64.1 gw 10.64.79.254


:


route del default


:


[root@localhost user]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.31.1.245 10.64.79.254 255.255.255.255 UGH 0 0 0 eth0
ns.garanta.ru 10.64.79.254 255.255.255.255 UGH 0 0 0 eth0
ryazan.goto-mul 10.64.79.254 255.255.255.255 UGH 0 0 0 eth0
172.31.1.252 10.64.79.254 255.255.255.255 UGH 0 0 0 eth0


- dns vpn. .

cat>/etc/ppp/peers/garanta :


pty "pptp 172.31.1.245 --nolaunchpppd"
user LOGIN
password "PASSWORD"
nodeflate
nobsdcomp
noauth


Ctrl+D smile.gif)

!!!
:


pppd call garanta debug nodetach

- :

Nov 12 21:14:03 localhost pppd[6308]: pppd 2.4.4 started by root, uid 0
Nov 12 21:14:04 localhost pptp[6309]: anon log[main:pptp.c:276]: The synchronous pptp option is NOT activated
Nov 12 21:14:04 localhost pptp[6313]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Nov 12 21:14:04 localhost pptp[6313]: anon log[ctrlp_disp:pptp_ctrl.c:738]: Received Start Control Connection Reply
Nov 12 21:14:04 localhost pptp[6313]: anon log[ctrlp_disp:pptp_ctrl.c:772]: Client connection established.
Nov 12 21:14:04 localhost pppd[6308]: Using interface ppp0
Nov 12 21:14:04 localhost pppd[6308]: Connect: ppp0 <--> /dev/pts/3
Nov 12 21:14:05 localhost pptp[6313]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Nov 12 21:14:05 localhost pptp[6313]: anon log[ctrlp_disp:pptp_ctrl.c:857]: Received Outgoing Call Reply.
Nov 12 21:14:05 localhost pptp[6313]: anon log[ctrlp_disp:pptp_ctrl.c:896]: Outgoing call established (call ID 0, peer's call ID 45946).
Nov 12 21:14:05 localhost pppd[6308]: PAP authentication succeeded
Nov 12 21:14:05 localhost kernel: PPP MPPE Compression module registered
Nov 12 21:14:05 localhost pppd[6308]: local IP address 10.100.57.4
Nov 12 21:14:05 localhost pppd[6308]: remote IP address 10.100.0.1
Nov 12 21:14:05 localhost pppd[6308]: primary DNS address 91.203.64.2
Nov 12 21:14:05 localhost pppd[6308]: secondary DNS address 213.137.236.3
Nov 12 21:15:05 localhost pptp[6313]: anon log[logecho:pptp_ctrl.c:676]: Echo Reply received.



:


pppd call garanta


:



[root@localhost user]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:E4:ED:0D:7D
inet addr:10.64.78.216 Bcast:10.64.79.255 Mask:255.255.254.0
inet6 addr: fe80::20a:e4ff:feed:d7d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:402729 errors:0 dropped:0 overruns:0 frame:0
TX packets:32660 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:91979764 (87.7 MiB) TX bytes:3602127 (3.4 MiB)
Interrupt:23

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:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:376 (376.0 b) TX bytes:376 (376.0 b)

ppp0 Link encap:Point-to-Point Protocol
inet addr:10.100.57.4 P-t-P:10.100.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:39014 errors:0 dropped:0 overruns:0 frame:0
TX packets:31908 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:55934130 (53.3 MiB) TX bytes:1842740 (1.7 MiB)





[root@localhost ~]# cat /etc/resolv.conf
# 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 91.203.64.2
search garanta.ru
nameserver 91.203.64.2 # ppp temp entry
nameserver 213.137.236.3 # ppp temp entry



. :


route add default dev ppp0

route add default gw 10.100.0.1


- :


[root@localhost user]# ping -c 3 www.google.ru
PING www.l.google.com (74.125.87.147) 56(84) bytes of data.
64 bytes from hb-in-f147.1e100.net (74.125.87.147): icmp_seq=1 ttl=54 time=51.2 ms
64 bytes from hb-in-f147.1e100.net (74.125.87.147): icmp_seq=2 ttl=54 time=51.0 ms
64 bytes from hb-in-f147.1e100.net (74.125.87.147): icmp_seq=3 ttl=54 time=48.5 ms

--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 48.502/50.262/51.285/1.263 ms


, smile.gif) !!!

, , - : /etc/rc.d/rc.local
, - , .

, ( ), .

P. s. - . smile.gif)
:

  |  Enable Signature
.