LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I .................. (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-26844/)

bigjohn 07-30-2002 02:25 PM

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

acid_kewpie 07-30-2002 02:27 PM

what do you mean by drop?

#ifdown eth0

not work for you?

jetblackz 07-30-2002 10:23 PM

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.

bigjohn 07-31-2002 03:24 AM

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!):confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused:

Mik 07-31-2002 04:38 AM

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

bigjohn 07-31-2002 11:17 AM

[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!!

bigjohn 07-31-2002 11:29 AM

[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

webtoe 07-31-2002 12:37 PM

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

jetblackz 07-31-2002 01:46 PM

"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

bigjohn 07-31-2002 02:59 PM

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!

jetblackz 07-31-2002 09:45 PM

You're welcome.

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

Understand, you will.
Patience, you must have.

bigjohn 08-12-2002 09:44 AM

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

jetblackz 08-12-2002 10:02 PM

Try

/etc/rc.d/init.d/network stop

gdrobson 08-12-2002 10:45 PM

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

Robert0380 08-15-2002 03:17 AM

just pull the plug !!! :)


All times are GMT -5. The time now is 05:42 AM.