republican-creole
Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Up and Running » Security » Security » How to block OUTGOING access to an IP address
Search Topic:
Uniqs:
664
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Aluria Trying To Erase History »
« McAfee Questions  
AuthorAll Replies


CapinPete
Premium
join:2002-12-23
Loxahatchee, FL
 How to block OUTGOING access to an IP address

I want to block outgoing access to an IP address. Blocking access by domain name is simple enough, however, this is proving to be a lot more difficult.

PrntRhd

join:2004-11-03
Fairfield, CA
Need more info. What are you blocking the address from?
Do you have a firewall?
Router?


CapinPete
Premium
join:2002-12-23
Loxahatchee, FL

My apologies. I do not use a software firewall and I prefer not to. I am behind a WRT54G running HyperWRT + tofu9.

I am not sure what you mean by "What am I blocking the address from"? My end goal is to prevent 2 things:
1) Users on my network circumventing the hosts file by using an IP address to access a website AND
2) Software from phoning home. A lot of software now uses an IP address over port 80 to phone home.

For obvious reasons I cant disable port 80. And since users/software can still use an IP address to access things I dont want them to the only solution is to block access to that IP.


no__1__here
Premium
join:2003-10-13
Tomball, TX

Use an iptables rule to block the outbound. I don't use HyperWRT so I don't know which groups they have defined, but basically you need a jump out of the FORWARD chain to a custom group where you list your stuff. An example:
# Populate your custom group, called Block_Outbound here
# use the IP in place of the FQDN used below
iptables -N Block_Outbound
iptables -A Block_Outbound -d www.cnn.com -j DROP
iptables -A Block_Outbound -d www.nytimes.com -j DROP

# Add a jump to FORWARD chain to check the above group
# Be sure to 'iptables -L FORWARD' to see which line you
# need to insert this before/after... assuming 4 here and a
# custom group name of Block_Outbound
iptables -I FORWARD 4 -j Block_Outbound

I'm sure this can be improved, but is given only as an example. :)

Add this to HyperWRT's firewall startup script.


kw
Premium
join:2004-06-12
reply to CapinPete
Just add an entry to your HOSTS file.


GadgetsRme
R.I.P. dadkins
Premium
join:2002-01-30
Canon City, CO

1 edit
Hey God, read the OP's post again. Play closer attn. to item 1.
--
Gadgets


kw
Premium
join:2004-06-12

Yes....and? You can just set the IP addy to forward somewhere else in the HOSTS file. For instance, you could forward Google.com (64.233.187.104) to localhost, then whenever you go to Google, it'll perform a DNS lookup to the above IP, then 404, because it'll attempt to load a page that is being served up on localhost instead.


GadgetsRme
R.I.P. dadkins
Premium
join:2002-01-30
Canon City, CO


2 edits
But if, as the OP says, the IP # is being entered instead of an (www.-----.com) address the Hosts file is bypassed and does not have any effect. The Hosts file will not change one IP # to another.

See this link for a more detailed explanation:
»accs-net.com/hosts/what_is_hosts.html

Especially note the restrictions section on the second page.
--
Gadgets
Forums » Up and Running » Security » SecurityAluria Trying To Erase History »
« McAfee Questions  


Sunday, 29-Nov 01:18:30 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [122] Time Warner Cable Fires Broadside At Broadcasters
· [112] New AT&T Ad Campaign Hits Back At Verizon
· [96] Apple Joins AT&T Verizon Snark Fest
· [87] New Bill Takes Aim At Higher Verizon ETFs
· [80] TiVo Sees Record Customer Losses
· [73] Weekend Open Thread
· [70] Verizon CEO: Hulu Will Be Dead Soon
· [69] In-Flight Internet Headed For Bumpy Landing?
· [62] Thanksgiving Open Thread
· [40] EFF Wages War On Fine Print
Most people now reading
· [How to] Install Asterisk on an Asus WL-520GU router [VOIP Tech Chat]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· sysguard2010.com [Security]
· ToC 4th boss - Preliminary Strategy for Twin Valkyr [World of Warcraft]
· [ PVP] 3.2 DK PvP D/W Spec... [World of Warcraft]
· Gizmo5 has added a Google Voice section in its members area. [VOIP Tech Chat]
· [Newsgroups] Newzleech down? [Filesharing Software]
· I need a DID Hosting service [VOIP Tech Chat]
· Using AirMax to provide triple play services? [Wireless Service Providers]