LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Blocking internet access on a centos 6 machine (https://www.linuxquestions.org/questions/linux-desktop-74/blocking-internet-access-on-a-centos-6-machine-4175540323/)

steves504 04-21-2015 10:14 AM

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?

Habitual 04-21-2015 10:44 AM

I would think that could be achieved by a simple edit of /etc/resolv.conf

steves504 04-21-2015 11:04 AM

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.

veerain 04-21-2015 12:01 PM

Quote:

Originally Posted by Habitual (Post 5350747)
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.

jefro 04-21-2015 02:56 PM

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.

gdr 04-27-2015 02:19 PM

Yeah, just add:

/sbin/ip route del default

to /etc/rc.local

unSpawn 04-27-2015 03:33 PM

...or you could simply pull the Ethernet cable if any?


Quote:

Originally Posted by steves504 (Post 5350741)
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?


All times are GMT -5. The time now is 02:01 AM.