LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-02-2015, 01:29 PM   #1
dhavaldxb
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Rep: Reputation: Disabled
Unhappy VPN router setup


Hi,

I have setup android 4.4.2 on cubox pro with NAT and Masquerade to share internet connection. I am able to do so as long as I don't connect this machine to a VPN. When I do, it continues to route the traffic without the VPN. I want all traffic to be routed through the VPN connection.

Below is my routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
10.200.4.0 * 255.255.252.0 U 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0


and Iptables

Chain INPUT (policy ACCEPT)
target prot opt source destination
bw_INPUT all -- anywhere anywhere
fw_INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
oem_fwd all -- anywhere anywhere
fw_FORWARD all -- anywhere anywhere
bw_FORWARD all -- anywhere anywhere
natctrl_FORWARD all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere 192.168.1.0/24 state RELATED,ESTABLISHED
ACCEPT all -- 192.168.1.0/24 anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- 192.168.1.0/24 anywhere
ACCEPT all -- 192.168.1.0/24 anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
oem_out all -- anywhere anywhere
fw_OUTPUT all -- anywhere anywhere
bw_OUTPUT all -- anywhere anywhere
st_filter_OUTPUT all -- anywhere anywhere

Chain bw_FORWARD (1 references)
target prot opt source destination

Chain bw_INPUT (1 references)
target prot opt source destination
all -- anywhere anywhere ! quota globalAlert: 2097152 bytes
all -- anywhere anywhere owner socket exists

Chain bw_OUTPUT (1 references)
target prot opt source destination
all -- anywhere anywhere ! quota globalAlert: 2097152 bytes
all -- anywhere anywhere owner socket exists

Chain bw_costly_shared (0 references)
target prot opt source destination
bw_penalty_box all -- anywhere anywhere

Chain bw_happy_box (0 references)
target prot opt source destination

Chain bw_penalty_box (1 references)
target prot opt source destination

Chain fw_FORWARD (1 references)
target prot opt source destination

Chain fw_INPUT (1 references)
target prot opt source destination

Chain fw_OUTPUT (1 references)
target prot opt source destination

Chain natctrl_FORWARD (1 references)
target prot opt source destination

Chain natctrl_tether_counters (0 references)
target prot opt source destination

Chain oem_fwd (1 references)
target prot opt source destination

Chain oem_out (1 references)
target prot opt source destination

Chain st_filter_OUTPUT (1 references)
target prot opt source destination
 
Old 01-02-2015, 10:58 PM   #2
dhavaldxb
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
pptp does the same as well

I setup pptp connection and it does the same as well. It routes traffic very well from all computers but just ignores the VPN meaning the traffic is always routed without the VPN. I want VPN to be the default gateway for all traffic on this system.
 
Old 01-03-2015, 12:29 PM   #3
dhavaldxb
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Solved

Solved it by adding 192.168.1.1 as default gateway for tun0 interface.
 
1 members found this post helpful.
  


Reply



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
Computer behind a Cisco router and VPN setup kevinlyfellow Linux - Networking 3 06-28-2014 04:09 PM
Does VPN require a VPN Passthrough Router? wh33t Linux - Networking 1 02-27-2013 03:38 AM
pptp vpn connetion from behind non vpn router paind Linux - Networking 0 07-18-2008 02:44 PM
Setup ssh and vpn router from home: suggestions/help GATTACA Linux - Networking 2 09-13-2005 08:40 AM
VPN: linux VPN server behind Linksys router hamish Linux - Networking 14 08-25-2005 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:07 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