LinuxQuestions.org
Help answer threads with 0 replies.
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 03-05-2010, 11:26 AM   #1
CADIT
LQ Newbie
 
Registered: Nov 2009
Location: Belfast Northern Ireland
Distribution: Debian Lenny
Posts: 7

Rep: Reputation: 0
pon connects ok to remote VPN but I cant get a route added automatically


Hi,
I have configured a VPN connection to a remote router which connects ok. I can ping the remote router IP, but cannot ping any other IP on their network.
I have put this down to needing a route added. I can manually type

# route add -net 192.168.1.0 netmask 255.255.255.0 dev ppp0

and all works like I want it to, but I really need this to be automatic everytime the connection starts.
I have tried following http://pptpclient.sourceforge.net/ro...utomatic-setup but cant get it to work. The file is called /etc/ppp/ip-up.d/routing and has execution priviledges (755) so ive hit a dead end. Ive even tried shrinking the file down to

#!/bin/sh
if [ "${PPP_IPPARAM}" = "tunnel" ]; then
/sbin/route add -net 192.168.1.0/24 dev ${IFNAME}
fi

But still nothing

Hope you can help.
Dave

Debian Lenny 2.6.26-2-686 base install (no desktop) with all updates

/etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.05.xx
netmask 255.255.255.0
gateway 192.168.05.xx

auto ppp0
iface ppp0 inet ppp
provider host1


/etc/ppp/options.pptp
lock
noauth
refuse-pap
refuse-eap
refuse-chap
refuse-mschap
nobsdcomp
nodeflate
require-mppe-128


/etc/ppp/peers/host1
pty "pptp ipofremotehost --nolaunchpppd"
name loginname1
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam host1
persist

Last edited by CADIT; 03-08-2010 at 10:10 AM. Reason: to give more information
 
Old 03-05-2010, 04:05 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Ive even tried shrinking the file down to

#!/bin/sh
if [ "${PPP_IPPARAM}" = "tunnel" ]; then
/sbin/route add -net 192.168.1.0/24 dev ${IFNAME}
fi
My understanding is that the name specified in the ipparam line of /etc/ppp/peers/host1 should be the same as the one you use in the if comparison in the /etc/ppp/if-up.d script.
 
Old 03-06-2010, 10:09 AM   #3
CADIT
LQ Newbie
 
Registered: Nov 2009
Location: Belfast Northern Ireland
Distribution: Debian Lenny
Posts: 7

Original Poster
Rep: Reputation: 0
Fixed

Thanks Neonsignal, thought it would be something simple that I was missing.
Once I changed the /etc/ppp/ip-up.d/routing file to
#!/bin/sh
if [ "${PPP_IPPARAM}" = "host1" ]; then
/sbin/route add -net 192.168.1.0/24 dev ${IFNAME}
fi

It all started working as normal.
Thanks again
 
Old 03-08-2010, 10:09 AM   #4
CADIT
LQ Newbie
 
Registered: Nov 2009
Location: Belfast Northern Ireland
Distribution: Debian Lenny
Posts: 7

Original Poster
Rep: Reputation: 0
where can I assign a static IP for my VPN ppp connection

This connection works fine getting its IP address from the remote router, but how would I setup a static IP for this ppp connection?
I can see localip:remoteip in the man pppd pages but I can only get the point to point ip to change, not the inet addr of the ppp0 connection.
 
  


Reply

Tags
auto, debian, ppp, route


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
pppd connects and route set up, but cannot resolve detly Linux - Networking 12 02-25-2008 10:16 PM
How to automatically detect when wpa_supplicant connects to a network d1s4st3r Linux - Wireless Networking 0 02-25-2008 03:43 AM
Default route not being added on boot - FC5 mbradshaw93 Linux - Networking 1 06-27-2007 11:05 AM
Signature not added automatically purelithium LQ Suggestions & Feedback 3 12-05-2005 10:07 AM
pppd connects, nothing uses route detly Linux - Networking 7 10-08-2005 02:24 PM


All times are GMT -5. The time now is 11:50 PM.

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