Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

(solved) How to start/stop a network interface (Stretch)

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
PaulS
Posts: 2
Joined: 2017-03-08 01:36

(solved) How to start/stop a network interface (Stretch)

#1 Post by PaulS »

Hi,

I just switched from Kubuntu to Debian Stretch with KDE and have a problem stopping my openVPN connections.

They are started automatically at system boot, but sometimes I have to stop one of them manually.
In old Debian I used ifup and ifdown for that task
In Kubuntu I used ifconfig

In Debian Strech I'm clueless, even after some recherche.
I have ifup and ifdown installed but it doesn't find my adapters.

My adapters are:
enp3sC for the ethernet device
tun1 and tun3 for openVPN devices

ifdown tun1 (or any other network device) just results in
ifdown: unknown inerface tun1

How is it done nowadays?
Last edited by PaulS on 2017-03-08 23:18, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: How to start/stop a network interface (Stretch)

#2 Post by Head_on_a_Stick »

I can't check this atm but try:

Code: Select all

# systemctl stop networking.service
Use this to start it again:

Code: Select all

# systemctl start networking.service
ifupdown only works if the connections are controlled through /etc/network/interfaces

You can do this instead if you want by configuring that file as desired with reference to interfaces(5).

EDIT: you can set an individual interface down with:

Code: Select all

# ip link set tun1 down
Bring it up again with:

Code: Select all

# ip link set tun1 up
deadbang

PaulS
Posts: 2
Joined: 2017-03-08 01:36

(solved) How to start/stop a network interface (Stretch)

#3 Post by PaulS »

Thanks a lot, Head_on_a_Stick,

systemctl stop networking.service didn't seem to do anything, but ip link set tun1 up / down did exactly what I wanted.

Can I mark this question as solved somehow? I did it by changing the subject, but maybe there's an "official" way?

Post Reply