Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 (edited) Are there Linux guys around here ? How should I save changes in configuration from cli ? for instance, changing ifconfig or ethtool settings. I've already logged in as root. thx Edited July 7, 2013 by odysiuos
synaesthesia Posted July 7, 2013 Posted July 7, 2013 Any changes you make to network settings require a restart of the networking stack; easiest way to do that and best practice anyway is to restart the machine.
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 I'm not asking how to APPLY a change, but how to SAVE a change.
synaesthesia Posted July 7, 2013 Posted July 7, 2013 With all due respect if you need to ask that, perhaps you need to be learning a little more about linux rather than diving in and making changes. Firstly, what text editor are you using? If you're new, and using vi then check out Vi Cheat Sheet
Jamo Posted July 7, 2013 Posted July 7, 2013 I'm not asking how to APPLY a change, but how to SAVE a change. Press save? They are only text config files, the moment you save, its..... saved. It's not like a switch where you could wr mem etc, the moment the text file is saved its done. If you are asking how to save in vi, then it would be by pressing :wq! If you edit network settings, then usually its service network restart
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 (edited) Yes, I don't have any experience with Linux. I'm a Cisco guy. I usually deal with the gui when I configure a smoothie. however sometimes I have to use the cli. So I'm looking for a command equivalent to "copy run start" or "wr mem" on Cisco ASA. Edited July 7, 2013 by odysiuos
ConradJones Posted July 7, 2013 Posted July 7, 2013 hello @odysiuos welcome to edugeek. most changes you make in text files will be saved by the act of exiting the text editor and saving, if you save and exit it will be saved. personally i prefer nano Ctrl + X to exit press Y to save or VI press esc and type wq: changes made via ifconfig or ethtool aren't persistent on linux, you need to make the change in the actual configuration file for it to be persistent across reboots / service restarts. the location varies from linux distro e.g. on mint /etc/network/interfaces e.g. on centos 1 /etc/sysconfig/network-scripts/ifcfg-eth0 Where it is on smoothwall, i'm not a 100%. I asked and they were a bit evasive about, possibly understandably if your going to expect them to support the product. Personally i haven't needed to make interface changes from the cli, the gui has seemed to cover what i need so far. what exactly are you trying to achieve ? It might be possible from the GUI, which would be a better option from the support point of view.
Jamo Posted July 7, 2013 Posted July 7, 2013 Yes, I don't have any experience with Linux. I'm a Cisco guy. I usually deal with the gui when I configure a smoothie. however sometimes I have to use the cli. So I'm looking for a command equivalent to "copy run start" or "wr mem" on Cisco ASA. Confused now are you using linux/smoothwall or an ASA? They are quite different!
Jamo Posted July 7, 2013 Posted July 7, 2013 Yes, I don't have any experience with Linux. I'm a Cisco guy. I usually deal with the gui when I configure a smoothie. however sometimes I have to use the cli. So I'm looking for a command equivalent to "copy run start" or "wr mem" on Cisco ASA. Ah apologies just re-read what you said. Linux doesn't have an equivalent, to make changes just edit file thes. The settings, however, will not take effect until you restart the services you altered.
ConradJones Posted July 7, 2013 Posted July 7, 2013 The settings, however, will not take effect until you restart the services you altered. unless he is making changes with ifconfig in which case the opposite is the case
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 thank you all for the fast reply. i'm not sure if I'm understanding all that terms "text file", "editor" & "vi". usually I log in on the utm-smoothwall using Putty by entering the ip address:222. then I enter root/smoothwall as username/password. then I'm in mode root@smoothwall# I'm trying to fix the duplex/speed of an interface instead of auto mode. dpulex = full speed = 100
Jamo Posted July 7, 2013 Posted July 7, 2013 thank you all for the fast reply. i'm not sure if I'm understanding all that terms "text file", "editor" & "vi". usually I log in on the utm-smoothwall using Putty by entering the ip address:222. then I enter root/smoothwall as username/password. then I'm in mode root@smoothwall# I'm trying to fix the duplex/speed of an interface instead of auto mode. dpulex = full speed = 100 Try: vi /etc/network/interfaces This should open a file with the interface config in it, if it doesn't then it will show an empty file and you will have to look elsewhere for the interface config files. If it is the config file, quit by typing :wq! this will exit vi. run: cp /etc/network/interfaces /home/interfaces.backup That will backup the original Next edit the interfaces file as you please using the guides here: /etc/network/interfaces Ubuntu Linux networking example
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 I could find /etc/network/interfaces. but my colleague advises me to do the following: cd /etc/actions/secondboot/ vi 99ethernetsettings press insert and copy these lines: #!/bin/sh ethtool -s ethC speed 100 duplex full autoneg off chmod +x 99ethernetsettings I'm a little bit confused.
ConradJones Posted July 7, 2013 Posted July 7, 2013 I could find /etc/network/interfaces. its different on different distro's, i did say earlier its not there on smoothwall. unfortunately i'm not sure where it is on smoothwall. try # find / -name interfaces or # find / -name *eth0 to see if you get any results @tom_newton might have an answer on a different way of doing this, I would have a look at our smoothwall box but I can't until monday unfortunately.
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 sorry I was wrong about /etc/network/interfaces.
ConradJones Posted July 7, 2013 Posted July 7, 2013 no need to apologise, i found smoothwall's setup a little confusing myself. did you try the find commands?
Jamo Posted July 7, 2013 Posted July 7, 2013 sorry I was wrong about /etc/network/interfaces. [ATTACH=CONFIG]19288[/ATTACH] do ls -ltr, shows up with colouring etc easier to determine what is a file etc. Yeah vi opens an empty file called /etc/network/interfaces if it doesn't exist! community.smoothwall.org • View topic - 8139 GREEN_DRIVER_OPTIONS= Any help? I think the network configs must be held somewhere in Smoothwalls config files rather than the standard linux ones. rc.network will be a startup script, possibly in rc.d or similar. You can use the find command as specified by @ConradJones to find where it is!
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 did you try the find commands? no, I used "whereis" I'm gonna try "find" right now
Guest odysiuos Posted July 7, 2013 Posted July 7, 2013 [root@smoothwall ~]# find / -name interfaces /settings/licences/interfaces /httpd/ui/categories/networking/subsections/interfaces /var/tmp/menu/modules/host/httpd/ui/categories/networking/subsections/interfaces /var/tmp/menu/modules/firewall/httpd/ui/categories/networking/subsections/interfaces /var/tmp/menu/httpd/ui/categories/networking/subsections/interfaces /modules/host/httpd/ui/categories/networking/subsections/interfaces /modules/firewall/httpd/ui/categories/networking/subsections/interfaces
Jamo Posted July 7, 2013 Posted July 7, 2013 [root@smoothwall ~]# find / -name interfaces /settings/licences/interfaces /httpd/ui/categories/networking/subsections/interfaces /var/tmp/menu/modules/host/httpd/ui/categories/networking/subsections/interfaces /var/tmp/menu/modules/firewall/httpd/ui/categories/networking/subsections/interfaces /var/tmp/menu/httpd/ui/categories/networking/subsections/interfaces /modules/host/httpd/ui/categories/networking/subsections/interfaces /modules/firewall/httpd/ui/categories/networking/subsections/interfaces Did you look at that post? It says use rc.network which should be in the /etc/rc.d file edit with the command /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off depending on the ethernet interface you are needing to edit. community.smoothwall.org • View topic - 8139 GREEN_DRIVER_OPTIONS=
ConradJones Posted July 7, 2013 Posted July 7, 2013 Did you look at that post? It says use rc.network which should be in the /etc/rc.d file edit with the command /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off depending on the ethernet interface you are needing to edit. community.smoothwall.org • View topic - 8139 GREEN_DRIVER_OPTIONS= I agree that probably looks like the way forward, can't say for certain without a box infront of me,
ConradJones Posted July 7, 2013 Posted July 7, 2013 i'm not sure if he's using express or full ? but on my full its ethA not eth0
Guest odysiuos Posted July 8, 2013 Posted July 8, 2013 (edited) Did you look at that post? It says use rc.network which should be in the /etc/rc.d file edit with the command /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off depending on the ethernet interface you are needing to edit. community.smoothwall.org • View topic - 8139 GREEN_DRIVER_OPTIONS= I'll look it up tomorrow and feed back. Edited July 8, 2013 by odysiuos
Guest odysiuos Posted July 8, 2013 Posted July 8, 2013 (edited) i'm not sure if he's using express or full ? but on my full its ethA not eth0 it"s ethA indeed. eth0 was just an example from me. Edited July 8, 2013 by odysiuos
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now