LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-30-2002, 03:25 PM   #1
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
How do I ..................


My speed touch adsl usb modem is configured, it works great etc etc so.....


how do I ............


Config the bloody thing to drop the connection without having to reboot my system ???


Replies on a postcard to - well ok in a post.

Though I would very much appreciate any help that you can offer written as "monkey see, monkey do" instructions, as I can just about manage to follow them

many thanks

John
 
Old 07-30-2002, 03:27 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
what do you mean by drop?

#ifdown eth0

not work for you?
 
Old 07-30-2002, 11:23 PM   #3
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
You mean you're worried that the Windows-only script kiddies would rip your Linux box off? Not a chance.

netstat -an | grep LISTEN

And see if anything unwanted is listening right after boot-up. If not, sit back and relax. If yes, you can remove the service(s) in Mandy Control Center as root. i.e. mutt, portmap, httpd, xdm, mysql, sendmail, fetchmail, diskcheck, for example, if you're running a stand-alone box, not server.
 
Old 07-31-2002, 04:24 AM   #4
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Original Poster
Rep: Reputation: 45
how do I........

Being new and uninformed (also probably a bit thick )at this linux game, under windows, my service provider supplies me with norton anti virus, now I know that under linux (mandy 8.2) the question of viruses whilst pertinent, isn't such a concern but what with this and an apparent lack of firewalling, I am not really happy leaving my system connected to the net unattended. I would not be concerned at all if I had a firewall in place, but I cannot find an app within the mandy 8.2 that will carry out that function.

When I previously had Suse 8.0 (personal) running, my brother had configured the modem and made sure that the firewall facility was running, as well as setting it up so when I was finished using the net, I just had to "Ctrl C" to drop the conection.

Since I managed to screw up the suse installation and after throwing my toys out of my pram and loading the mandy 8.2 over the top (mandrake 8.2 is more to my liking and has a less "sterile" feel to it) I have managed to configure my modem myself (ok, with a large amount of assistance from LQ and the MUB forums) it still concerns me to leave the connection up and potentially vulnerable, hence I am in the habit of disconnecting the net access link.

So the question is how should I try and set it up so I can "drop the link" to the net or maybe what could I do about a firewall, since under windie$ I use the zone alarm freeware firewall and have no problem with leaving that up and running.

Beacuse of my amoebic level of knowledge about linux, I really need the "monkey see monkey do" instruction to be able to accomplish anything i.e. linux 3, johns confidence in using linux 0.

Any ideas/info much appreciated

Regards

John

Oh and just for info, I don't tend to do much with regard to amending and changing my linux install because being a "non-IT" person, a lot of the help posted here and at other locations is well and truely over my head (like British Rail, i'll get there eventually!)

Last edited by bigjohn; 07-31-2002 at 04:26 AM.
 
Old 07-31-2002, 05:38 AM   #5
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well I've never really used a modem on linux but as far as I know the pppd program gets used to connect. So wouldn't just killing the pppd process be sufficient? Something like 'killall pppd'. You could probably make a simple script out of that and place it on your desktop with a nice icon if you like the point click stuff.

And for a firewall you should be looking into iptables. You should read the documentation at www.iptables.org
 
Old 07-31-2002, 12:17 PM   #6
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Original Poster
Rep: Reputation: 45
[root@localhost john]# netstat -an | grep LISTEN
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32769 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:119 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
unix 2 [ ACC ] STREAM LISTENING 5974 /tmp/.ICE-unix/2454
unix 2 [ ACC ] STREAM LISTENING 5646 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 5727 /tmp/medusa-idled-service
unix 2 [ ACC ] STREAM LISTENING 3241 private/cleanup
unix 2 [ ACC ] STREAM LISTENING 5869 /tmp/ksocket-john/klauncherZadP2b.slave-socket
unix 2 [ ACC ] STREAM LISTENING 5834 /tmp/ksocket-john/kdeinit-:0
unix 2 [ ACC ] STREAM LISTENING 5842 /tmp/.ICE-unix/dcop2348-1028130727
unix 2 [ ACC ] STREAM LISTENING 3574 /tmp/.font-unix/fs-1
unix 2 [ ACC ] STREAM LISTENING 5951 /tmp/mcop-john/localhost_localdomain-0941-3d4807ad
unix 2 [ ACC ] STREAM LISTENING 3392 /dev/gpmctl
unix 2 [ ACC ] STREAM LISTENING 3251 private/rewrite
unix 2 [ ACC ] STREAM LISTENING 3655 /var/run/news/nntpin
unix 2 [ ACC ] STREAM LISTENING 3255 private/bounce
unix 2 [ ACC ] STREAM LISTENING 3259 private/defer
unix 2 [ ACC ] STREAM LISTENING 3263 private/flush
unix 2 [ ACC ] STREAM LISTENING 3267 private/smtp
unix 2 [ ACC ] STREAM LISTENING 3271 public/showq
unix 2 [ ACC ] STREAM LISTENING 3275 private/error
unix 2 [ ACC ] STREAM LISTENING 3279 private/local
unix 2 [ ACC ] STREAM LISTENING 3283 private/virtual
unix 2 [ ACC ] STREAM LISTENING 3287 private/lmtp
unix 2 [ ACC ] STREAM LISTENING 3291 private/cyrus
unix 2 [ ACC ] STREAM LISTENING 3295 private/uucp
unix 2 [ ACC ] STREAM LISTENING 3299 private/ifmail
unix 2 [ ACC ] STREAM LISTENING 3303 private/bsmtp

This is the result of the netstat command. What is it telling me? as I have previously mentioned, as far as linux is concerned I am a total idiot.

Could someone explain it to me ???

John

p.s. i'll post again, I'm just gonna try acid_kewp's ifdown thing!!

Last edited by bigjohn; 07-31-2002 at 12:19 PM.
 
Old 07-31-2002, 12:29 PM   #7
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Original Poster
Rep: Reputation: 45
[root@localhost john]# ifdown eth0
usage: ifdown <device name>

this is what I get with the ifdown suggested by acid_kewpie.

[root@localhost john]# ifdown ppp0
usage: ifdown <device name>
[root@localhost john]# man ifdown
No manual entry for ifdown
[root@localhost john]# killall
usage: killall [ OPTIONS ] [ -- ] name ...
killall -l, --list etc etc etc

is what I get when I try the obvious!!!


[root@localhost john]# killall -- ppp0
ppp0: no process killed
[root@localhost john]# kill -- ppp0
bash: kill: ppp0: no such pid
[root@localhost john]# killall -v
usage: killall [ OPTIONS ] [ -- ] name ...
killall -l, --list
killall -V --version etcetera

is what I get when I try to interpret the other stuff

[root@localhost john]# killall -v -- ppp0
ppp0: no process killed
[root@localhost john]# killall -v -- eth0
eth0: no process killed etc etc

is what I get when I reach the limit of my miniscule knowledge!!

any other ideas please???

regards

John
 
Old 07-31-2002, 01:37 PM   #8
webtoe
Member
 
Registered: Apr 2001
Location: Cambridge, England
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617

Rep: Reputation: 30
you are using an asdl modem yes?

There is a way that you could just kill your connection. When you make a connection you use a program called dhcpcd (a client which will talk to your isp to get an ip address). You can kill this off with the command 'killall dhcpcd' as root.

that ifdown thing is a script for when you are using a dial up modem thingy and will perform commands when you disconnect.

iptables is a program used to set up a packet filtering firewall (like what you have for windows) though you need your kernel to be set up right for it to work.

One important thing you need to be doing is making sure that you don;t have pointless things running, waiting for an incoming connection (such as an ftp daemon). This is what that netstat -an | grep LISTEN was checking for. A lot of stupid server programs that are only supposed to be for server's are started on a desktop machine. You especially want to make sure that telnetd isn't running.

im assuming that mandy has a nice little tool to do this for you otherwise you need to edit a file in the /etc directory.

HTH

Alex
 
Old 07-31-2002, 02:46 PM   #9
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
"I would not be concerned at all if I had a firewall in place, but I cannot find an app within the mandy 8.2 that will carry out that function." - Unfortunately, 8.2 is a rushed product. Some parts of the interface are broken.

In terminal/console as root, type

tinyfirewall

Follow the instructions. No to all servers. Yes to save & exit.

--
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32769 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:119 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
--
I see why you're concerned.

111 must be closed. A lot of pings are done on 111. SUN-RPC I suppose.

6000 is X server. Not needed.

80 is Web server. No need.

119 is nntp for newgroup server. No such need.

631 is some Web-based tool. I think it's CUPS. It lets you set up printer in web browser.

25 is mail server?

Ok, you log out & log back in as root. Open Mandy Control Center> System> Service, uncheck the ones I mentioned above. If in doubt, uncheck one, click stop, wait a bit, and check netstat.

If you see ssh and Openssh, REMOVE them at all costs.

To remove 6000, open terminal/console,

vi /usr/X11R6/bin/startx
hit "i", and replace
defaultserverargs=""
with
defaultserverargs="-nolisten tcp"
hit ESC, type ":wq"
Log out, restart X (in a drop-down menu), log back in, check netstat
 
Old 07-31-2002, 03:59 PM   #10
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Original Poster
Rep: Reputation: 45
TVM

Ta very much both,

I'm just going to dive in now and see what happens, though i'll probably be back with more stupid questions !!!

John

p.s. Yo, jetblackz, i've heard of "serial killers" and serial ports, but you're the first serial OS installer that i've ever come across! either that or you got some strange raid set up the size of a small house!
 
Old 07-31-2002, 10:45 PM   #11
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
You're welcome.

LOL. Call me whatever you will. I'm cool. Actually, I prefer to be the light-saber-flashing Yoda.

Understand, you will.
Patience, you must have.
 
Old 08-12-2002, 10:44 AM   #12
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Original Poster
Rep: Reputation: 45
how do I........

Okay, the drill battery is flat so ongoing work on "boxing in" the boiler in the bathroom has stopped, hence :-

I have tried:-

ifdown eth0
ifdown pppd
ifdown ppp0
killall
kill --ppp0
kill --pppd
kill ppp0
kill pppd
kill dhcpcd
etc
etc

and variations of the above and all I seem to get back is a "bash reply" of no process killed.

So how do I kill my internet connection, with out having to reboot the linux (mandy 8.2).

I understand that if I can work out the process id (pid) I should be able to use kill "the pid number". So how do I find out what the pid number is for my net connection???

regards

John
 
Old 08-12-2002, 11:02 PM   #13
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
Try

/etc/rc.d/init.d/network stop
 
Old 08-12-2002, 11:45 PM   #14
gdrobson
Member
 
Registered: Jun 2002
Location: Ontario, Canada
Distribution: RH8.0
Posts: 65

Rep: Reputation: 15
Re: how do I........

Quote:
Originally posted by bigjohn
Okay, the drill battery is flat so ongoing work on "boxing in" the boiler in the bathroom has stopped, hence :-

I have tried:-

ifdown eth0
ifdown pppd
ifdown ppp0
When connected to inet type:

ifconfig

there it will show you the device that has your ip.

then

ifdown $device_from_ifconfig (as root will shut youdown)

also:

ps -ef will list all the processes running on your system then
you can try killall process name or

kill -9 (process ID)

hope helps
 
Old 08-15-2002, 04:17 AM   #15
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
just pull the plug !!!
 
  


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




All times are GMT -5. The time now is 08:30 PM.

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