connecting Mac Big Sur with pptp network workaround almost working

1.4k Views Asked by At

I have a MacOS Big Sur that no longer accesses the PPTP MSCHAP* network by apple's definition (security issues), but I need to access this network anyway.

What do I did it to solve:

Installed an ec2/ubuntu with a vpn client that accesses this PPTP network (ppp0) and an openvpn server (tun0) to accept connections.

The idea was to use this machine as a kind of bridge, connect MacOS Big Sur in this network tun0 and route between tun0 <--> and ppp0 by so giving Mac access to PPTP destination network. Who likes networking and routes to give me a helping hand?

The office PPTP network is 192.168.1.0/32 with gateway 192.168.1.2

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1396
        inet 192.168.1.116  netmask 255.255.255.255  destination 192.168.1.102
        ppp  txqueuelen 3  (Point-to-Point Protocol)
 
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.8.0.1  netmask 255.255.255.0  destination 10.8.0.1
        inet6 fe80::e142:c31e:197c:4301  prefixlen 64  scopeid 0x20<link> 

ens5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
        inet 172.31.48.187  netmask 255.255.240.0  broadcast 172.31.63.255
        inet6 fe80::c42:4dff:fe82:eda1  prefixlen 64  scopeid 0x20<link>
        ether 0e:42:4d:82:ed:a1  txqueuelen 1000  (Ethernet)

Server routing table:

$ ip route show
default dev ppp0 scope link 
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 
143.255.15.240 via 172.31.48.1 dev ens5 
172.31.48.0/20 dev ens5 proto kernel scope link src 172.31.48.187 
172.31.48.1 dev ens5 proto dhcp scope link src 172.31.48.187 metric 100 
187.16.96.166 via 172.31.48.1 dev ens5 src 172.31.48.187 
192.168.1.102 dev ppp0 proto kernel scope link src 192.168.1.116 

Mac Big Sur routing:

% netstat -nr -f inet
Routing tables

Internet:
Destination        Gateway            Flags        Netif Expire
default            192.168.43.1       UGScg          en0       
127                127.0.0.1          UCS            lo0       
127.0.0.1          127.0.0.1          UH             lo0       
169.254            link#12            UCS            en0      !
192.168.43         link#12            UCS            en0      !
192.168.43.1/32    link#12            UCS            en0      !
192.168.43.1       80:58:f8:76:26:8a  UHLWIir        en0   1198
192.168.43.87/32   link#12            UCS            en0      !
224.0.0/4          link#12            UmCS           en0      !
255.255.255.255/32 link#12            UCS            en0      !

I tried on server adding my route:

iptables -I FORWARD -i tun0 -o ppp0 -m conntrack --ctstate NEW -j ACCEPT
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE 

tried also adding routing rule for the gateway in client or server but doesn't work

/sbin/route add default 192.168.1.2 -ifscope utun2

**I can acesse office servers from ubuntu openvpn server and I connect to this server from Big Sur, the case is with this question:

How to route the network so I can access office network from home?**

thanks in advance!

0

There are 0 best solutions below