Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-26-2003, 05:57 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: NZ
Distribution: redhat 9
Posts: 15
Rep:
|
Testing IPTABLES Firewall
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.
Cheers
jamie (NZ)
|
|
|
08-26-2003, 10:38 PM
|
#2
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
Check out nessus:
www.nessus.org
|
|
|
08-26-2003, 10:41 PM
|
#3
|
Member
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498
Rep:
|
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.
--tarballedtux
|
|
|
08-27-2003, 05:09 PM
|
#4
|
LQ Newbie
Registered: Aug 2003
Location: NZ
Distribution: redhat 9
Posts: 15
Original Poster
Rep:
|
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?
Once again thanks for your input,
Jamie (NZ)
|
|
|
08-27-2003, 07:29 PM
|
#5
|
Member
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498
Rep:
|
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.
--tarballedtux
|
|
|
08-28-2003, 08:23 AM
|
#6
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
Quote:
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.
|
|
|
08-28-2003, 09:17 AM
|
#7
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
Adding to HangDog42's post
You can use tcpwrappers to restrict access to sshd by ipaddress
e.g. in /etc/hosts.allow
sshd: 172.16.254.100 192.168.21.
|
|
|
All times are GMT -5. The time now is 07:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|