LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2003, 10:26 PM   #1
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Rep: Reputation: 15
Unhappy changes made to network config not savng


Running Rh 8.0 When in gnome, and trying to tweak the ip addresses via broadband in the network config tool, i go to 'apply' changes or even click okay and it gives me the error exception in saveProfiles. I'm trying to get someone to be able to ssh or telnet into my machine but its not working because i cant save changes. Is there a way to change them it without gnome?
 
Old 06-15-2003, 10:49 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 271Reputation: 271Reputation: 271
root?

Are youdoing this as user or root? You probably have to be root.
 
Old 06-15-2003, 11:40 PM   #3
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Original Poster
Rep: Reputation: 15
Yeah as root

Also, the ethernet works okay, because i can access the internet but when i try to put in the ip address so other users can log in, it won't save the changes, which im sure is a bug. I click debug and it hangs...there has to be a file i can manually just put in the ip address ?


Last edited by matrim; 06-15-2003 at 11:54 PM.
 
Old 06-16-2003, 12:22 AM   #4
RebootKid
Member
 
Registered: Feb 2003
Posts: 37

Rep: Reputation: 15
Well, you could do it with an ifconfig statement.
There should also be /etc/scripts/netconfig IIRC, but I could be confused.

the ifconfig statement should look something like
localhost#ifconfig eth0 10.10.10.10 netmask 255.255.255.0
that'll set your ip to 10.10.10.10, with a 24 bit mask.
then, assuming you'll need to set a gateway, so that information goes out, do this:
route delete -net 0.0.0.0 netmask 0.0.0.0
(This will clear out any potential conflicting default routes)
then
route add -net 0.0.0.0 netmask 0.0.0.0 a.b.c.d
where a.b.c.d is the IP of your gateway.

As a side note, you could try running netconfig, instead of using neat (Rh's X11 gui)
 
Old 06-16-2003, 01:28 AM   #5
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
I'm not sure if RebootKid's post answered your question. But to expand on what he/she said:

In RH 8.0 you should have the following for a simple DHCP client network configuration that survives a reboot:

/etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=yourhost.yourdomain

/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes


If, instead, you have a static IP address, the files would look like this:

/etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=yourhost.yourdomain
GATEWAY=192.168.1.1

/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

Use your own address and network information. This is a typical simple example for a scenario where you have a DSL or cable link to the internet protected with a packet-filtering router (192.168.1.1). Your gateway may be a different router of yours, or a host at your ISP.

This information is correct as of RH 8.1 and RH 9.0. I think it was the same with 8.0, but I don't run that anymore...

Once you have this set up, you should be able to issue:
# service network restart
# ifconfig

ifconfig will report if eth0 is properly configured. As mentioned, this is the correct way to set this up in RH so it survives a reboot.

I suspect this doesn't answer your real question, though. I'm not sure what you're asking. Are you trying to filter services (ssh, telnet) by source IP address (that of your friends)?
 
Old 06-16-2003, 02:34 AM   #6
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Original Poster
Rep: Reputation: 15
almost there

Okay here are the specs:
I'm accessing the internet through a wireless Microsoft router (base station etc). It assigns ip network address of 192.168.2.14 and in using dhcp I am and connected to the internet etc...However no one can telnet into my machine. I had this problem earlier, corrected it, now ive changed ip's again and can't seem to get the settings right.
Specs:
WAN IP address: 12.255.17..etc
Subnet mask: 255.255.255.192
Def gateway: 12.255.17.1
Prim DNS: 216.148.227.68

Now with these stats howdo i
netconfig etc my machine so my buds can telnet in?
 
Old 06-16-2003, 10:46 AM   #7
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
I assume your router is performing packet filtering - and hopefully all or most all ports are closed to incoming connections. Otherwise you're wide open to attacks. I can't be more specific on this because I'm not familiar with the particular router.

Carefully open up incoming access in the router through the ssh port (22).

You should not use telnet in this configuration. It's not secure. Ideally you should limit ssh access based on source IP address (your bud's). Either way, ideally give your buds accounts on your machine, and limit ssh access to those users, and use strong passwords.

So if you can restrict by source IP, add the following to /etc/hosts.deny:

sshd : ALL EXCEPT 192.168.2.0/255.255.255.192, n.n.n.n

where n.n.n.n is your friend's IP address. The 192 stuff keeps ssh open to your own internal network. If your friend doesn't have a static IP address, but one given out via DHCP from an ISP, then it's not as safe, but still reasonable, to replace n.n.n.n with that ISPs network(s) and netmasks, just like we did for your 192 network:

n.n.n.n becomes for instance, 12.255.17.0/255.255.255.0 - just an example.

OK, the above is assuming you can restrict based on source IP. This next part should not be optional unless you want to leave your world open to all. (Even with ssh - it's like putting a nice lock on your open door - useless).

Create user accounts for your friends - with proper restrictions - depending on the access you want to offer.

Then assuming a user 'joe', add the following line to /etc/ssh/sshd_config:

AllowUsers joe

(You probably want to allow yourself on this line as well).
Then restart sshd:
# service sshd restart

I know this seems like a lot of detail, but there's no way to allow others to connect to your machine without opening your router/firewall, and when you do that, telnet is extremely insecure, and ssh is only secure when properly configured. If more paranoid you could exchange public keys in advance via e-mail...

Hope this helps.
 
Old 06-16-2003, 05:10 PM   #8
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Original Poster
Rep: Reputation: 15
Okay I'm really confused now (sorry, green newb here) There should be a simple way to allow people to telnet in using the WAN ipaddress which is routed by the Microsoft base station. I've done it before, but my ip changed and in trying to fix it, got all messed up and I can't remember how I did it before. Hehe. Now, frankly these buds of mine would just telnet in to play something called a MUD on port 4000, which worked fine before, but isn't now.
I'm just hoping to get it set so they can telnet my WAN then the port 4000.

In the past, ive gone into gnome network device control and tried various settings until it worked. Now back to the original question of this thread which lead to the above question Why won't my changes save after clicking apply or even close? Am I going to have to reinstall? Ugh.
Security doesnt really matter atm because i just purged my top secret CIA files and have nothing left on my box but MUD code and a few other snippets.
 
Old 06-16-2003, 09:05 PM   #9
matrim
Member
 
Registered: Dec 2002
Location: utah
Distribution: Redhat; Fedora 2, 6
Posts: 114

Original Poster
Rep: Reputation: 15
Cackle

Well it's working fine. In netconfig i just had to click dynamic IP configuration, then mailed my buds the WAN ip, and after sticking the correct addresses in the hosts file, everyone can connect. I was trying to test it by telnet'ing in to my own machine via the ip address which didnt work.

Now...hehe, still having problems making changes in gui for network, am i out of luck..do i have to reinstall?

Thanks for input btw

Last edited by matrim; 06-16-2003 at 09:06 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Get on Network, Network Config Help needed scbmls Linux - Hardware 1 08-15-2005 12:43 PM
sendmail for internal network and network config questions RedHat123 Linux - Networking 0 04-06-2005 04:15 PM
how redgat-network-config to windows network arpi Linux - Networking 1 08-10-2004 07:10 PM
config network zexter Mandriva 3 11-01-2003 12:48 PM
possible samba config problem or network config issue? rruffin Linux - Networking 3 06-03-2003 05:04 PM


All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration