LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-05-2007, 01:55 AM   #1
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 293

Rep: Reputation: 31
VPN routing


Hello
I connect to internet using vpn (pptp). Unfortunately I can't make my routes in order to connect using Linux. My ISP gives in my opinion very strange IP addresses. Here is the situation.

LAN settings
my IP 172.16.90.129
GW 172.16.90.1

VPN settings
IP to connect 172.16.2.21
and the problems start here

when I connect to VPN server I receive following addressed
my IP 172.16.126.138
remote IP 172.16.2.21

I make the followin
route del default - in order to change the default gw 172.16.90.1
route add default gw 172.16.2.21 dev ppp0 - to add default gw through VPN server
but there is no internet

Here is the routing table under windows
Quote:
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.16.90.1 172.16.90.129 21
0.0.0.0 0.0.0.0 172.16.126.138 172.16.126.138 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
172.16.2.21 255.255.255.255 172.16.90.1 172.16.90.129 20
172.16.90.0 255.255.255.0 172.16.90.129 172.16.90.129 20
172.16.90.129 255.255.255.255 127.0.0.1 127.0.0.1 20
172.16.126.138 255.255.255.255 127.0.0.1 127.0.0.1 50
172.16.255.255 255.255.255.255 172.16.90.129 172.16.90.129 20
172.16.255.255 255.255.255.255 172.16.126.138 172.16.126.138 50
224.0.0.0 240.0.0.0 172.16.90.129 172.16.90.129 20
224.0.0.0 240.0.0.0 172.16.126.138 172.16.126.138 1
255.255.255.255 255.255.255.255 172.16.90.129 172.16.90.129 1
255.255.255.255 255.255.255.255 172.16.126.138 172.16.126.138 1
Default Gateway: 172.16.126.138
I also tried under linux to add 172.16.126.138 but nothing happens

Please suggest
 
Old 02-06-2007, 11:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
so essentially you have unfortunately similar ip addresses? you would typically use a tunnelled interface as your default gatewy, e.g. tun0, but you seem to be trying to use the remote perr as the ip next hop, which it isn't. can you show us the real output of ifconfig and route -n when you're connected please?
 
Old 02-08-2007, 12:18 AM   #3
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 293

Original Poster
Rep: Reputation: 31
This is the ifconfig

eth0 Link encap:Ethernet HWaddr 00:0B:6A:C5:CA:3B
inet addr:172.16.90.129 Bcast:172.16.90.255 Mask:255.255.255.0
inet6 addr: fe80::20b:6aff:fec5:ca3b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1229 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:111418 (108.8 KiB) TX bytes:9505 (9.2 KiB)
Interrupt:19 Base address:0x4d00

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

ppp0 Link encap:Point-to-Point Protocol
inet addr:172.16.126.138 P-t-P:172.16.2.21 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1490 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:1130145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:146 (146.0 b) TX bytes:403760018 (385.0 MiB)


and this is route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.2.21 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.16.90.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 172.16.90.1 0.0.0.0 UG 0 0 0 eth0

thank you
 
Old 02-08-2007, 01:46 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
so where's the VPN? i see an ethernet lan, and a ppp connection. no vpn there at all... can you ping the ppp0 gateway?
 
Old 02-08-2007, 01:58 AM   #5
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 293

Original Poster
Rep: Reputation: 31
that's the VPN - it's pptp and raises ppp0 interface.
I can't ping peer ppp 172.16.2.21 when ppp connection is established.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN routing Ipolit Linux - Networking 1 12-13-2006 10:54 AM
Routing problem with VPN maxabbr Linux - Networking 1 05-10-2006 03:43 PM
routing and VPN cboyd Linux - Networking 7 12-01-2004 02:02 AM
VPN Routing Possibilities duaux Linux - Networking 0 08-20-2004 10:53 AM
Non-Next Hop Routing / VPN Tarantismic Yak Linux - Networking 0 10-26-2001 01:06 AM


All times are GMT -5. The time now is 07:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration