Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Hello I have a query I'd appreciate if you guys could help me with. I want to thoroughly TEST A FIREWALL I've built.
I've blocked off all incoming ports (INPUT) except 22 and 80 (the firewall's running apache) and it will only FORWARD port 80, 22, 25, 443. All output is accepted.
I've done some port scanning using nmap both from the outside and from within. Looks good.
Is there any other way I can test the firewall coz I've got 3 or 4 windows clients behind it and I want to make sure they aren't drawing unwanted traffic back inside. I'm only allowing incoming packets to be forwarded that are part of an established connection over ports 80, 25, 443 and 22.
So are you saying form the internal perspective. Only connections going to ports 22, 25, 80, 443. Get out onto the internet? Thats a start as that prevents some potentionly bad stuff from going on. Like IRC trojans trying to phone home, or spyware and/or legit software phoning home to some arbitrary port. Only allowing 22 and 80 into your server is good as long as you further secure those services. Maybe only allow SSH connections from specific IPs and certain users. Think about possibly chrooting that apache daemon. Someone on here can help you with that or look it up.
Hey thanks guys for your input, it's going be really useful. I was going to use firewall tester and I'll check out that nessus stuff too.
I remotely connect to this network to administer it. I have a dial up connection so my IP address changes every time. So I can't restrict access to ssh to certain IP addresses, right?
If the IP you connect from to adminster it never changes then you can restrict access.
Just make a rule like so:
IPTABLES -A INPUT -s <ip of where you're administering your network from> -p tcp --dport 22 -j ACCEPT
IPTABLES -A INPUT -p tcp --dport 22 -j DENY #Or just let your final DENY ALL rule handle it.
So I can't restrict access to ssh to certain IP addresses, right?
You might not be able to restrict ssh by IP address, but you CAN restrict ssh by user. In the sshd_conf file there is an AllowUsers line. Just list the users you want to have ssh access and it won't matter what IP address they are coming from.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.