Can only connect to internet via VPN SOLVED

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ort

Can only connect to internet via VPN SOLVED

Post by ort »

I can only connect to the internet thru my VPN. With the VPN disconnected I cannot connect with ethernet or wireless. If I turn on the VPN it will connect with both. I also cannot connect to my router. I type in the routers address (192.168.1.1) and it will not connect, with or without the VPN. I have a second computer on my LAN that seems to work fine. It will connect to the router and internet with or without the VPN. The computer in question worked fine up until a day ago. Upon further investigation I find that Samba is also not working on the computer in question. Obviously the problem is isolated to the computer in question but as to why it has these problems....beats me. Any help would be muchly appreciated. Thanks in advance. :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
greerd
Level 6
Level 6
Posts: 1060
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Can only connect to internet via VPN

Post by greerd »

Sounds like a firewall issue, did you setup firewall rules or if using your vpn's app, enable network lock (or similar)?
Normally a vpn app with network lock will modify your iptables which should be able to be reset by issuing a sudo iptables -F to flush out any rules.

Normally when you close the vpn app it will do this for you but if you killed or exited the app abnormally, the iptables rules will stay, blocking any network access.
ort

Re: Can only connect to internet via VPN

Post by ort »

Hey greerd,
Thanks for the reply. I have firewall turned off and tried your suggestion with no luck....same as before. One thing I have noticed is that there are differences between the network managers with the two computers on the lan. The computer that works has a network manager that has an on/off choice for each of two ethernet cards in the computer. The computer that ain't working has "auto ethernet" that apparently auto selects the card thats plugged in? Don't know if thats a correct assessment or not, this is the first time I've noticed that.
User avatar
greerd
Level 6
Level 6
Posts: 1060
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Can only connect to internet via VPN

Post by greerd »

I've never had the pleasure of having two nic cards so I'm not sure, but I would expect that you should be able to click on the network manager icon, open up Network connections and only enable the card you want to use?
ort

Re: Can only connect to internet via VPN

Post by ort »

"only enable the card you want to use"
Thats sort of what I thought also. This is the first time I've become aware of "auto ethernet". I'm pretty sure that the computer in question matched the one with separate on/off functions. Must have gotten changed by an update????? The computer in question gets used much more then the other and ,hence, gets updated way more then the other. Yes, I have unplugged and plugged both cards on the bad computer and they are both the same.
Faust

Re: Can only connect to internet via VPN

Post by Faust »

I do have a machine with two NICs ( useful for testing pfSense ) and the minor problems I had were quickly fixed via Network Manager
.... I can't add to what has already been said .

Myself , I'd be looking closer at this :-
ort wrote: Fri Apr 06, 2018 12:35 pm ..... The computer in question worked fine up until a day ago.
What changed ?
Is it logged somewhere ?
ort

Re: Can only connect to internet via VPN

Post by ort »

Hey faust
I'm not sure what happened to cause this. I tried to use samba the other day and it was out so I thought I would look at the router and thats when I realized I could not connect to the router. I then thought that maybe the VPN was acting up so I turned it off and lost all connectivity to the internet. Turned the VPN back on and it connnected to the internet??? This could have been going on for a long time and I just didn't know it. The VPN turns on automatically on boot so it would always connect to the internet and fool me into thinking everything was fine. Samba being out is what caused me to start looking around and spotting the problem. Anyway thanks for your time to reply.
User avatar
greerd
Level 6
Level 6
Posts: 1060
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Can only connect to internet via VPN

Post by greerd »

Did you try disabling the vpn autostart, then rebooting?
ort

Re: Can only connect to internet via VPN

Post by ort »

Good idea! Just tried it but no joy. :(

I'm starting to think its a bad address for something. MAC / IP for the computer. I'm just grasping now. Thinking of deleting all the entries for the different ethernet connections in network manager and rebooting to see if it assigns different (and good) address'. Would hate to do that and discover that network manger will do no such thing and have it pop a notification "game over".
ort

Re: Can only connect to internet via VPN

Post by ort »

Much progress being made while I stumble around in the dark. I have been turning the VPN on/off with the VPN app but have been leaving the app open in the tray.If I close out the VPN app so it is no longer in the tray things return to the way they should be (sort of). I can connect to my router, Samba appears to be back (shows up on the network anyway, haven't tested it but pretty sure its OK) and I'm connected to the internet BUT I have no VPN. When I start the VPN app and connect to the VPN I have internet over the VPN but when I disconnect from the VPN and leave the app open its right back to the bad behaviour.
So, Let it be known that I take back all the bad Ju Ju that I've been mumbling to myself about Linux and plan on making a frontal attack on the VPN company. I'll leave this as unsolved and when I hear what the VPN people say I will report back here.
ort

Re: Can only connect to internet via VPN

Post by ort »

VPN kill switch. The thing that disconnects you from the internet if the VPN involuntarily disconnects. I don't even remember turning it on but I must have. I turned it off and then back on and bingo! Back to normal, so, NEVERMIND. Thanks to you guys for sharing your thoughts on the subject and I'm sure we will talk again soon. Adios Amigos
Locked

Return to “Networking”