Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a firewall whose eth1 nic needs to be able to be disabled/enabled quickly by cli, effectively stopping and starting all traffic through that interface. The OS is Slackware. Can anyone help with this?
config changes like this will not persist a reboot. this is for live changes only. on a reboot, original config files are reread, so you would need to edit those.
Ok, I tried it out. Using 'ifconfig eth1 down' it shut down the interface as expected. When I brought it back up with 'ifconfig eth1 up', none of the computers on the network could connect to the Internet. I had to reboot the firewall to reestablish the connection. How do I fix this without rebooting?
Can anyone help with my last question? Viewing a printout of the route, it looks like that's where it's missing info. So I'm thinking I need to rebuild the route table?
The easiest is to use ifup and ifdown commands.
Basically it's supposed to do:
1)ifconfig eth1 up
2)route add default gw <defaultgw>
3)modify your DNS settings in /etc/resolv.conf
In order to reestablish the connection, I use 'ifconfig eth1 up', which I think is the same as 'ifup eth1'?. I don't physically disconnect the cable. I was hoping for a single command solution that would bring me up and down quickly, as this is a firewall for my work.
In case it's not clear what I'm trying to do: What I want to do is simply stop traffic on the interface, then resume.
It looks like you did'nt read my initial post
ifup does plenty of things (I only listed 3 of them), not only ifconfig.
Actually, I did read it. I just MISREAD it!
Now that I've REREAD it I see what you're talking about. I'll give it a go. Thank you very much for your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.