LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-21-2015, 10:14 AM   #1
steves504
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
Blocking internet access on a centos 6 machine


I am currently working on a centos 6 machine that has its network configured, and access to the internet. What I am looking to test is for the machine to still have the same network configured but block access to the internet.

Can I please get some assistance on how to get this done?
 
Old 04-21-2015, 10:44 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I would think that could be achieved by a simple edit of /etc/resolv.conf
 
Old 04-21-2015, 11:04 AM   #3
steves504
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you Habitual, I'll try changing that and also my gateway to the internet and see if that gives me what I am looking for.
 
Old 04-21-2015, 12:01 PM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by Habitual View Post
I would think that could be achieved by a simple edit of /etc/resolv.conf
You mean removing nameservers? Still users can go on with ip addresses.
 
Old 04-21-2015, 02:56 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Get rid of gateway address.

Could go wild and make hosts file only set of ip's allowed. Other firewall rules, block ports and such.
 
1 members found this post helpful.
Old 04-27-2015, 02:19 PM   #6
gdr
Member
 
Registered: Jun 2013
Distribution: Mint KDE
Posts: 44

Rep: Reputation: Disabled
Yeah, just add:

/sbin/ip route del default

to /etc/rc.local
 
Old 04-27-2015, 03:33 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...or you could simply pull the Ethernet cable if any?


Quote:
Originally Posted by steves504 View Post
What I am looking to test is for the machine to still have the same network configured but block access to the internet.
Can you explain, preferably in detail, what you're actually trying to test or achieve?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
blocking or unblocking users access to internet laskays Linux - Newbie 5 01-03-2012 12:15 AM
[SOLVED] Network Bridge Blocking Switch/Internet Access almcneill Linux - Networking 3 08-31-2011 06:46 PM
Blocking external usb storage access on centos 5 pradeep.oops Linux - Security 2 05-23-2008 05:47 AM
IPTables is blocking my OpenVPN internet access! eponymous Linux - Security 2 01-23-2007 01:40 PM
blocking specific websites, but allowing internet access poiuytrewq Linux - General 6 08-31-2006 11:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration