You are not logged in.

#1 2019-09-11 10:58:42

erfanjoker
Member
From: Tabriz / Iran
Registered: 2017-03-26
Posts: 174
Website

pptp tunneling over terminal [SOLVED]

Hi, i have a PPTP VPN configured in NM using NM Xfce Applet wich seems to work fine and tunnels my network in GUI Apps

but whenever i enter a command in terminal, my transfered data via terminal is not getting tunneled (i get access denied msg thanks to my conutry)

im looking for a command to run my commands under a PPTP tunneling in terminal , maybe an alternative to torsocks for my PPTP vpn

Last edited by erfanjoker (2019-09-11 19:58:28)

Offline

#2 2019-09-11 17:16:35

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: pptp tunneling over terminal [SOLVED]

Could you please show your relevant network config?

ip link
ip addr
ip route

I suspect your routing config is incorrect. Please check if your target address is going through the pptp device and if not either add an entry or change the default route.

Offline

#3 2019-09-11 17:22:07

erfanjoker
Member
From: Tabriz / Iran
Registered: 2017-03-26
Posts: 174
Website

Re: pptp tunneling over terminal [SOLVED]

Thanks for your reply, here are the outputs of the commands :

╭─erfan at erfan in /home/erfan
╰─λ ip link                                            0 < 02:21:11
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 3c:97:0e:18:72:cc brd ff:ff:ff:ff:ff:ff
3: wlp3s0b1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 74:e5:43:57:b0:70 brd ff:ff:ff:ff:ff:ff
7: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 3
    link/ppp 
╭─erfan at erfan in /home/erfan
╰─λ ip addr                                            0 < 02:21:14
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 3c:97:0e:18:72:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.9/24 brd 192.168.1.255 scope global dynamic noprefixroute enp4s0
       valid_lft 62613sec preferred_lft 62613sec
    inet6 fe80::40b:c95c:8758:905f/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlp3s0b1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 74:e5:43:57:b0:70 brd ff:ff:ff:ff:ff:ff
7: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc fq_codel state UNKNOWN group default qlen 3
    link/ppp 
    inet 3.3.3.194 peer 176.9.205.148/32 scope global ppp0
       valid_lft forever preferred_lft forever
╭─erfan at erfan in /home/erfan
╰─λ ip route                                           0 < 02:21:25
default dev ppp0 proto static scope link metric 50 
default via 192.168.1.1 dev enp4s0 proto dhcp metric 100 
88.99.247.216 via 192.168.1.1 dev enp4s0 src 192.168.1.9 
88.99.247.216 via 192.168.1.1 dev enp4s0 proto static metric 100 
176.9.205.148 dev ppp0 proto kernel scope link src 3.3.3.194 metric 50 
192.168.1.0/24 dev enp4s0 proto kernel scope link src 192.168.1.9 metric 100 
192.168.1.1 dev enp4s0 proto static scope link metric 100 

Offline

#4 2019-09-11 17:44:51

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: pptp tunneling over terminal [SOLVED]

Please someone correct me if I am wrong, but multiple default gateways result in random selection of the interface unless you define them in multiple routing tables. In your case a solution would be to remove the one provided by your local interface which should not be used:

ip route del default via 192.168.1.1 dev enp4s0

Offline

#5 2019-09-11 18:12:55

erfanjoker
Member
From: Tabriz / Iran
Registered: 2017-03-26
Posts: 174
Website

Re: pptp tunneling over terminal [SOLVED]

PPTP Tunneling works fine for GUI Apps but not working in terminal commands, i dont guess its about interfaces or etc

Offline

#6 2019-09-11 18:38:18

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: pptp tunneling over terminal [SOLVED]

So, did you test it?

Also show a tracepath for the address you try to reach:

tracepath -4b $target

Also show the output of

ip rule
sysctl net.ipv4 | grep [^a]rp_filter

Disconnect from your vpn and run

ip monitor

Reconnect and provide the output as well.

Offline

#7 2019-09-11 20:35:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: pptp tunneling over terminal [SOLVED]


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2019-09-11 21:06:02

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: pptp tunneling over terminal [SOLVED]

works fine for GUI Apps but not working in terminal commands

~ ·> GUI Apps
zsh: command not found: GUI
~ ·> terminal commands
zsh: command not found: terminal

The separation you claim does not exist. There's no fundamental network I/O difference between a generic CLI and a generic GUI process, so please be more specific on the test cases.

Offline

#9 2019-09-11 21:34:16

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 629

Re: pptp tunneling over terminal [SOLVED]

Where your network traffic goes is determined by the destination...IOW everything is a terminal app.

https://wiki.archlinux.org/index.php/PP … _Tunneling

It's a routing issue...

Offline

Board footer

Powered by FluxBB