LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-2014, 12:44 AM   #1
schwasskin
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Rep: Reputation: Disabled
VPN Routing Issue


First let me say hello to everyone, I have been a long time browser of this forum. This is my first time posting. Thanks in advance.


Having Issues with my VPN
This is what my network interfaces and routes look like before I start the VPN



eth1 Link encap:Ethernet HWaddr 50:46:5d:0a:7c:4d
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5246:5dff:fe0a:7c4d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14801 errors:0 dropped:1 overruns:0 frame:0
TX packets:9927 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2989813 (2.9 MB) TX bytes:1103700 (1.1 MB)

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:2200 (2.2 KB) TX bytes:2200 (2.2 KB)


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

Commands I use to start VPN:

sudo /etc/init.d/pppd-dns restart
sudo /etc/init.d/xl2tpd restart
sudo /etc/init.d/ipsec restart

ipsec auto --up L2TP-PSK
echo "c StrongVPN" > /var/run/xl2tpd/l2tp-control


Network interfaces and routes after VPN has started:

eth1 Link encap:Ethernet HWaddr 50:46:5d:0a:7c:4d
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5246:5dff:fe0a:7c4d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15431 errors:0 dropped:1 overruns:0 frame:0
TX packets:10641 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3062622 (3.0 MB) TX bytes:1237201 (1.2 MB)

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:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2300 (2.3 KB) TX bytes:2300 (2.3 KB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:yyy.yyy.yyy.208 P-t-P:yyy.yyy.yyy.129 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:74 (74.0 B) TX bytes:82 (82.0 B)


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
yyy.yyy.yyy.129 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

I changed the IP's a little for my sense of security

Anyway the ppp0 interface seems to be up. How do i route traffic through it?
My main goal is to set rtorrent to use yyy.yyy.yyy.208 as its binding IP and torrent through the tunnel. But its not working.

Any help is appreciated. Thanks in advance.

Im using ubuntu 12.10 64bit
 
Old 02-06-2014, 12:51 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
I have to take this from memory, you might need to check the syntax.
You can modify routing with the "route" command, in your case something like:
# route add -net 172.16.1.0 netmask 255.255.255.0 ppp0

But then of course you must know the ip/network of destination.
 
Old 02-14-2014, 07:01 AM   #3
schwasskin
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Solved

I ended up deleting the default gateway and just pushed everything through the VPN. For torrents the only way to get it to go through the VPN is to use the VPN interface as the default gateway. So I am moving the torrents to a virtual machine and pushing that machines default gateway through the VPN interface. This will allow me to have other services going through the regular internet.
 
  


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 not routing through server but still local routing pptpd narnie Linux - Server 1 01-21-2014 07:03 PM
Application specific routing (not routing p2p over vpn) tkalfaoglu Linux - Networking 1 06-15-2013 07:33 AM
routing / vpn issue Rickead2000 Linux - Software 1 01-24-2010 06:34 PM
Routing issue with VPN Client into PPP/Poptop loopy69 Linux - Networking 1 10-07-2004 09:48 AM
VPN routing /DNS issue cyph3r7 Linux - Networking 1 05-06-2004 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration