Jump to content

How Allow Internet Connexion For Only A Given Ip Or Hosts (whitelist Ip)


Recommended Posts

Hi !

My goal is to allow internet connexion for only some website (a whilteList IP).

Exemple: allow anly connexion to 209.73.177.115 (mail.yahoo.com) and block all other connexion.

is it possible to do that with autoit ?

Please help

Thinks

Edited by supergg02
Link to comment
Share on other sites

Hi !

My goal is to allow internet connexion for only some website (a whilteList IP).

Exemple: allow anly connexion to 209.73.177.115 (mail.yahoo.com) and block all other connexion.

is it possible to do that with autoit ?

Please help

Thinks

I don't think AutoIT is the right tool.

What you want is a proxy server, like Squid, running on a Linux box. I'm sure there are other options if you simply MUST give your money to Microsoft, but I assumed you wanted it to work... :think:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Quick Fix Solution:

In firefox set a proxy for ssl and http sites (Tools, Options, General, Connection Settings), to something that definetely won't work like "Prohibited Sites" and use port 80.

Then on the "No proxy for these sites" list, you put you sites you want to allow, you can narrow it down by adding the specific url like www.autoitscript.com/autoit3/downloads.php or you can just specify a domain.

Edited by Simucal
AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

if you just want to block a few specific sites (and have admin rights on NT-based OS) then you could consider modifying the HOSTS file to block the specific sites (which would be a cheap & cheerful method)... if you are going to block huge ranges, then HOSTS file isn't the way for you.

Windows 95/98/Me c:\windows\hosts

Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts

Windows XP Home c:\windows\system32\drivers\etc\hosts

Link to comment
Share on other sites

thinks for your help but all these solutions dont give me what i want.

I need a solution that open internet connexion for only a given domaine ( List of IP).

something like this

IF requeted IP is not in WhileListIPs then block internet connexion.

Link to comment
Share on other sites

Quick Fix Solution:

In firefox set a proxy for ssl and http sites (Tools, Options, General, Connection Settings), to something that definetely won't work like "Prohibited Sites" and use port 80.

Then on the "No proxy for these sites" list, you put you sites you want to allow, you can narrow it down by adding the specific url like www.autoitscript.com/autoit3/downloads.php or you can just specify a domain.

This is what you want. No website will work unless you specifically ADD it to the "No proxy" list.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

This is what you want. No website will work unless you specifically ADD it to the "No proxy" list.

Ok but this is only if user use firefox !

user may use other browser or other exe to connect to internet so this is not a "global" solution.

Edited by supergg02
Link to comment
Share on other sites

... :think:

#cs
_________________

  TCP Block WEB  
  for autoit beta
_________________

#ce

;#NoTrayIcon
Dim $ConnectedSocket = -1
$g_IP = "127.0.0.1"


#region BLOCK LIST
;---<<< blocked sites >>>
$no_everything = "*" ; You can block all websites that arent allowed
$no_msn= "http://msn.com" & "207.68.172.246"
$no_myspace= "http://myspace.com" ;& ip address


;add more if you wish
;;;;;
;--- endsites

;---------------------
;BLOCK
$blocked = $no_msn & $no_myspace 
;---------------------
#endregion lists

#region ALLOWED LIST
;---<<< allowed sites >>>
$everything = "*"; You can allow all sites that arent blocked
$google= "http://google.com";& ip address
$autoit= "http://www.autoitscript.com" ;& ip address
$yahoomail= "http://www.mail.yahoo.com" & "209.73.177.115"

;add more if you wish
;;;;;
;---end allowed sites

;---------------------
;ALLOW
$allowed= $google & $autoit & $yahoomail
;---------------------
#endregion

while 1
sleep(10); <depends on Internet connection?????
disallow()
allow()
WEnd

Func disallow()
$MainSocket = TCPListen($g_IP, 65432,  100 )
If $allowed = -1 Then
TCPAccept ($allowed)
EndIf
EndFunc

Func allow()
$MainSocket = TCPListen($g_IP, 65432,  100 )
If $blocked = -1 Then
TCPCloseSocket ($blocked)
EndIf
EndFunc

$blocked = TCPAccept($ConnectedSocket)
If $blocked > 0 then msgbox(0,"Error", 'The connection has been reset')
[code]
Link to comment
Share on other sites

Most broadband providers now provide you with software that will do this for FREE. (well, you pay for it through your service)

Mine offers McAfee Security - which is subpar to other solutions but does the job well enough.

You may want to check with them before spending a long time developing something to do it.

Link to comment
Share on other sites

Hi,

or have a look at programs like WebWasher. I think the URL-filter should do the trick.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

WebWasher, URL-filter and other firewall are designed to block a black list domaines or IP ! but what I need is a tools that filter all outcaming connexion to allow only a few IP or domaine (ie white list domaine or IPs)!

Edited by supergg02
Link to comment
Share on other sites

Link to comment
Share on other sites

There is this one function called _Talk_To_Your_Kids just an idea. :think:

The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Link to comment
Share on other sites

did you think a lot to have this wonderfull idea ? :think:

this topic may have other goal (administrator job or testing software witch you souspis it to send other thing than wath is designed for....)

Edited by supergg02
Link to comment
Share on other sites

The real question is Super, what is your purpose?

If you are talking about a small business or corporation then you should really look at a proxy solution. I use one at home but that has more to do with learning then function (it also has cache's advantages but that is not relevent here). A proxy, almost any proxy, can block every IP you want it to from the user. And the user has no choice but to accept the proxy because it is their only way out to the internet. You already mentioned you are behind a router; setting up a proxy server is only 1 more step, you just have to learn how to do it.

Edited by NightGaunt
"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...