netstat -lp

Place to discuss Fedora and/or Red Hat
Post Reply
bazoukas
programmer
programmer
Posts: 192
Joined: Tue Jan 14, 2003 1:38 pm
Location: NYC
Contact:

netstat -lp

Post by bazoukas » Mon Feb 03, 2003 8:41 pm

I am trying to close port 6000 and I went under xdm/Xservers and added the line -nonlisten tcp.
I did a port scan with my other machine to the above machine yet the port is still open.
I run netstat -lp and plain netstat on the machine am trying to close the port and I get lots of I-nodes and all of them come from the temp folder. Must be the applications that gnome is running and I dont see any port 6000 open.

BTW i restarted X after i altered the Xservers file.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Feb 03, 2003 9:02 pm

I usually use "iptables" to block all that sort of stuff (firewall). Or block it from everywhere except from specific client addresses. I meant to get into setting up your firewall rules when we went over your IP Masquerading but we didn't get that far...

Having said that, are you really using XDM or are you using KDM or GDM to start an X session? If you are using GDM then I would say you need to add the parameter to /etc/X11/gdm/gdm.conf (or one of the other configuration files under that directory. If you are using KDM you might want to look through the /etc/X11/xdm/kdmrc file and see if it spawns X from another location. Also, I don't know if that is a typo in your original message but the parameter should be "-nolisten" and not "-nonlisten".

Regardless, iptables is the easiest way and independent of which X display manager you use. For servers that touch the Internet I do a mostly closed configuration. I deny everything on the outside interface except for the specific ports I want coming in. And then I restrict those ports to the specific IP addresses/ranges that need to connect to them. I also block a lot of outbound traffic in many cases so if a breach of one of the open services were to occur information may not be able to be sent back to the person doing the breaching..

bazoukas
programmer
programmer
Posts: 192
Joined: Tue Jan 14, 2003 1:38 pm
Location: NYC
Contact:

Post by bazoukas » Mon Feb 03, 2003 9:22 pm

Am using GDM but you know what,,,,,ill go start reading about Iptables now. Looks like from what you say thats the best way to go./ If am gonna learn this Ill better learn it the RIGHT way.

Am sending my ass to the Static ip thread I made to see the links again.

Can I manage to learn iptables in one night by the way?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Feb 03, 2003 9:26 pm

Why don't you start a new thread called "iptables firewall" in the Networking section. I should move that other thread there too. Yes, iptables really isn't that hard. In fact you can use the graphical Red Hat firewall utility or webmin to configure it if you want. They all use iptables and /etc/sysconfig/iptables save file. I prefer command line or webmin.

Also, could you post the contents of your existing /etc/sysconfig/iptables file and I'll merge in some basic block all firewall rules for you and explain them.
Last edited by Void Main on Mon Feb 03, 2003 9:31 pm, edited 1 time in total.

bazoukas
programmer
programmer
Posts: 192
Joined: Tue Jan 14, 2003 1:38 pm
Location: NYC
Contact:

Post by bazoukas » Mon Feb 03, 2003 9:28 pm

Will do Sir.

Post Reply