Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

web blocking

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
Isomorph
n00b
n00b
Posts: 55
Joined: Sun Sep 22, 2002 12:35 pm
Location: Denmark

web blocking

  • Quote

Post by Isomorph » Wed Dec 01, 2004 6:57 pm

I am working on a paper, but I have a little problem.
I think I am a little addicted to web surfing so I don't
get enough written on my paper.

So is it possible to block web traffic to my account at
some time interval ?

I maybe have to write a cron script.
But what program can I use to block the web traffic
of a single user?

I am running some servers on the same machine so just
polling the plug don't work.
Top
bryon
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Fri Feb 14, 2003 7:08 pm
Contact:
Contact bryon
Website

iptables

  • Quote

Post by bryon » Wed Dec 01, 2004 7:43 pm

as long as you are not trying to run a web server on your work station you can just block all port 80 traffic with iptables.
Top
syscrash
Guru
Guru
User avatar
Posts: 541
Joined: Mon Apr 14, 2003 12:43 am
Contact:
Contact syscrash
Website

  • Quote

Post by syscrash » Wed Dec 01, 2004 9:45 pm

If you are addicted enough, you will kill the script when it takes effect :P The best way is to prevent yourself.
Play ET? Come by #gentoo.et on freenode!
http://syscrash.ca
Top
Isomorph
n00b
n00b
Posts: 55
Joined: Sun Sep 22, 2002 12:35 pm
Location: Denmark

  • Quote

Post by Isomorph » Thu Dec 02, 2004 12:42 am

well, I am runing a web server.

And I am not that addicted, but if I get an email
with a link in it. I sometime click it without thinking. An then suddently 5 hours has past. :x

If I can make it so that I can only use the web after 21.00. It would be fine.
Top
Isomorph
n00b
n00b
Posts: 55
Joined: Sun Sep 22, 2002 12:35 pm
Location: Denmark

  • Quote

Post by Isomorph » Sat Dec 04, 2004 4:28 pm

I have made it now.

I compilet iptables into my kernel and put
these lines into my crontab

Code: Select all

0 7 * * * iptables -I OUTPUT 1 -p tcp --dport 80 -m owner --uid-owner shs -j DROP
0 21 * * * iptables -D OUTPUT 1
My user is 'shs', so this should work as intended, right ?
Top
Post Reply

5 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic