Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a Dell Latitude D600 notebook which I use for business school. The Dell runs Red Hat 9.0. At home I have the Dell networked to my Apple iBook G4 via Linksys Ethernet router.
I have just gotten Samba set up on the Dell such that the Apple can mount its shares this is a huge benefit to me since I have a synch program on the Apple that syncronizes my school files from the Dell to the Apple for backup.
I have only been able to get the Apple to connect to the Dell as a Samba share by disabling Red Hat's firewall. Obviously I can't take the Dell on campus with the firewall off, so here are my questions:
Which ports need to be on for NMDB, etc to allow the Apple to mount the Dell's shares? How can I modify the Dell's firewall settings to open these ports while allowing the others to stay closed? Would I still be safe logging onto a Windows network on campus in this state?
Or is it better to simply turn off the Dell's firewall when I'm home since I am behind the LInksys ethernet router's firewall? That option makes me nervous as well.
Can a shell scrip be written to quickly turn on and off the ports I need so the process can be make quicker? Or could I create different runlevels (one for school, one for home) which would have different firewall settings?
Thanks!
Rich Hoyer
Dell Latitude D600
Red Hat 9.0
Apple iBook G4
OS X 10.3
Yes sure. You just need to fit it into your exisitn iptables rules. something like this should work:
iptables -A INPUT -p udp --dport 137 -j ACCPET
iptables -A INPUT -p udp --dport 138 -j ACCPET
iptables -A INPUT -p tcp --dport 139 -j ACCPET
Hey thanks a ton! and what about syntax to shut them off again when I leave home and go back on campus? I'd just like to have two shell scripts that I run real quick when I come home and then leave.
Sorry for all the questions - the campus network is hardly friendly territory re security.
Out of curiousity, would I be safe if I just turned the LInux firewall off so long as I'm behind my ethernet router/firewall at home? Could I still surf the net safely like that, or is it a stupid idea?
I sure appreciate your time. Pretty cool to be able to learn all this stuff.
Isn't it kind of scary that all my classmates are on that network with Windows machines where the default is to have the firewall off to begin with? Jeez, even if I forgot my firewall off I will always kill Samba when I leave home. The default Windows configuration leaving home with Samba on and the firewall off, isn' t it?
shell script failed using exactly the commands you listed - it said there was no such command. But I did not add -t and the exact location of the iptables - was that my mistake? Where are the tables usually located?
Can't see how the idea of the shell script will work you mean? I thought I'd write one shell script that opened the relevant ports, then started Samba and then a second that shut off Samba and closed those ports again. Perhaps I am over thinking things?
It looks to me from the errors I'm getting like I need to specify a specific table for the iptables command to append. But I'm not sure which one to specify.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.