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.
|
 |
01-01-2007, 12:17 AM
|
#1
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware 12
Posts: 184
Rep:
|
Only allow outbound connections
I want to block all incoming and forwarding connections, except those necessary for everyday use. I had tried that, but it I lose connection to the internet, so obviously there are some exceptions, what are they? I thought just blocking them would be enough, but I need some exceptions  .
In summary, I'm looking for exceptions that will allow me to connect to the internet with minimal exceptions used. If it helps, the laptop uses DHCP and uses a network printer. That's pretty much the only things I would see being needed. Any help is greatly appreciated.
|
|
|
01-01-2007, 01:08 AM
|
#2
|
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381
Rep:
|
Have you looked into iptables? how are you trying to limit connectivity?
|
|
|
01-01-2007, 01:28 AM
|
#3
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware 12
Posts: 184
Original Poster
Rep:
|
Sorry, that was what I meant. I want to do this using iptables. I tried using "iptables -P INPUT DROP" and "iptables -P FORWRAD DROP", but I lost connectivity to the internet, so obviously their are some exceptions which I'm not sure of.
|
|
|
01-01-2007, 02:37 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by CrEsPo
Sorry, that was what I meant. I want to do this using iptables. I tried using "iptables -P INPUT DROP" and "iptables -P FORWRAD DROP", but I lost connectivity to the internet, so obviously their are some exceptions which I'm not sure of.
|
well, the FORWARD rule is unrelated if you're not doing forwarding - and it doesn't sound like you are... but check with a:
Code:
cat /proc/sys/net/ipv4/ip_forward
as for the "iptables -P INPUT DROP", you are correct in that you'd need a couple rules in order for that to work... they are:
Code:
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
just my  ...
|
|
|
01-01-2007, 11:54 AM
|
#5
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware 12
Posts: 184
Original Poster
Rep:
|
Thank-you, worked like a charm and it's exactly what I needed  . Thanks again  .
|
|
|
All times are GMT -5. The time now is 02:55 PM.
|
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
|
|