Adding firewall rule on Windows Phone 8.1 - c#

I really don't know how to look for what I am trying to achieve. I will add two images to show you in a better way what I am doing here.
As you can see I have added a blocking rule in firewall which will block a range of addresses(first rule on the second image) of a specific application.
Is there a way to do something similar on windows phone?
I am not looking for some code or anything. Just for some guidance. Where should I look? What should I look for? Windows phone don't have firewall and I don't want to use any external firewall app's if there is one...

There is nothing like a firewall for Windows Phone. You don't have such a deep access to the network layer. Compared to desktop PC operating systems users and developers are much more restricted in the things they are allowed to do. That leads to less vulnerable systems.
The good side of a restricted system is that it's much harder (or almost implossible) to create a virus, trojaner etc. for it.
On the other hand you are not able to control the system in its depth since there is no API an anti virus software or firewall would need to consume.
In short: It's not possible to block IP addresses for specific applications.

You can't do it with the public API (no such API is available), however you still able to achieve your goal on the interop unlocked handset.
Please refer to this forum about unlocking your phone, and this thread about blocking some sites (i.e. it's an old trick with the editing of \windows\system32\drivers\etc\hosts file).
I'm pretty sure, you can also add a real firewall rule ('cause firewall service is up and running on the WP8.1 & up OS'es) to the registry but this require more investigation.

Related

How to get the Caller Info from VoIP in real-time in a .NET Application?

I am working on a project which includes a lot of VoIP functions. I don't have access to the source code of the previous system that was being used so I can't dissect it to find out what I need to know. I will describe how the previous system used to work and then ask my question.
First, the old system that we have been using depends on Physical Phones which receive calls over the internet. There is a Desktop App installed on our computer which somehow takes the phone call received by the phone and shows that phone number on the Desktop App. Which uses that number to look up data about the caller. But the problem is that this Desktop App is over a decade old and has not been updated since. So we want to build a new Web Based Application with .NET that will do the same. My question is:
1- How do I fetch the Caller Information From the Physical Phone and use it how I want? The phone being used is SNOM 760 but its possible that other brands or models be used in the future.
2- Let's say that a specific page is always opened on the browser. How do I transfer the caller number to the server and then show a pop up with the information about the caller in that page that's always opened in the browser in a RELIABLE way? What about when that specific page is not opened? Remember that the phone that is receiving this call is not directly in communication with the server. But that is also not a restriction. I read somewhere while researching that I could have my server take the call first and then transfer it to that physical phone. The only restriction is that we use VoIP phones/numbers.
Like I said, I have very vague information on the subject. Any help is appreciated. I've studied that I could use Twillio or other such third party services to achieve this task but I just wanted to know if I can do it myself instead of relying on someone else and hoping they don't shut down their services in the next few years.
Those are a lot of questions jammed into 1 there, I'll try to answer some.
As you already tagged it, TAPI is an option but not very easy to get into. TAPI normally get it's information centrally from the PBX, but in your particular case the SNOM system has the phones themselves connect to a central server to gather the information and distribute it there. You may be able to hook into a proprietary protocol.
Gathering calls on a central server to then distribute them to phones is usually done with an IVR (Interactive voice response). Channeling outside calls through it is easy but the problem with getting your call information from this point is usually you miss the internal calls.
Your website pop-up is not my area of expertise, maybe someone else could comment on the feasibility of that, but personally I would go with a task-tray style app if reliability is your highest priority.

C# Windows 8.1 app hide settings and data from user

I'm building a Windows Store app with C#, and I have certain data and settings that I need to persist between sessions. Right now I'm doing this with local files, but for some of it, I don't want the users to be able to edit the files. I currently thwart that by using "scary" file names and obfuscated data, but I want better security, but also don't want to have to jump to my cloud service just to pull their settings, because I want functionality when internet connectivity doesn't exist.
How do I do this? I feel like this is something that should be pretty commonly used feature in apps.
I never worked on Windows 8/8.1 apps, so maybe there is some integrated feature to do what yout want, but I didn't find anything on that subject.
In fact, what I found seems to indicate the opposite :
If you want the data of your Windows Store app to be secured, you have
to do it by yourself.
Depending on the desired level of security you could try using some form of encryption for your local files.
This would make the settings unreadable by the user, and prevent them to tamper with it.
But as pointed in Windows 8 Apps - Local Storage Security, encryption might not be the best way if you really want to make sure the data cannot be edited outside your app, since it is possible to extract the key from your app and decode the data.

How to detect incoming network transfers in windows (preferably in c#)

I was wondering if anyone knows how (or even if it is possible) to monitor and trigger an action when a computer running windows (7-8) starts reciving a file transfer from over the network onto one of its drives.
Bonus points if I can find out how big the file is that the other guy is placing on my machine and how much is done etc...
I want to know if there is any API in windows, or snippit of code, or some other API that provides any of this functionality.
I still want to be able to recive files, I just want to manage them better. I am on a network with over 90 computers and this software that I wish to write would be running on most of them.
Of course you can (after all it's what an Antivirus program does) but it's NOT easy and probably you'll see it's more comfortable to do in C than in C#. I'm sure there's a .NET porting of WinPCap anyway you can always P/Invoke.
Start reading about Network Monitor SDK on MSDN. It's not an easy task, you have to capture a specific set of frames, you may use a Network Packet Monitor to inspect the content and the type of the packets you have to capture and parse.
I'm not sure but you may take a look to QoS API (start reading this article), it should provide something you can use.

CommandLine IP block / unblock in Windows Firewall with Advanced Security

I'd like to programmatically be able to block outgoing packets to some IPs. Nevermind the application, I would like to be able to do it.
I have Windows 7 x64 Professional so it comes with WindowsFirewall with Advanced Security which has an outbound filter capability.
Currently I'm manually adding rules to block an IP, but there has got to be a better way.
I read this: Any way to turn the "internet off" in windows using c#? and http://msdn.microsoft.com/en-us/library/bb945065.aspx so I know it's possible to write such applications.
I'm a java programmer, and I couldn't find an jni to interface with firewall.dll. I don't know anything about C# to write one myself.
I'm asking if there a - there's a tool out there that can do this, please let me know about it. I've Googled and Googled, but alas - nothing. If there isn't please get me started on how to write it myself.
In case you're feeling generous, you could write one for me s.t. you could block outbound traffic to an IP and unblock it.
Thank you all very much.
The most straightforward way would be just to run netsh, here's an article on how to do it
A modern alternative to netsh is powershell. The commands Enable-NetFirewallRule and Disable-NetFirewallRule allow you to turn rules on/off from a powershell script. The command Set-NetFirewallRule allows you to edit an existing firewall rule, for if you want to change the ip address a rule is affecting. You could even add new rules using New-NetFirewallRule as well if needed.

Touchscreen in CE5 blocking data traffic from peripheral

We are developing a platform with Windows CE 5 (soon to be upgraded to 6) in .Net CF 2 C#.
What we have recently discovered is that if we are touching the touchscreen while using our peripheral, the peripheral data trafic times out and our application crashes. So it seems like the touchscreen is blocking it. As a quick fix we would like to disable the touchscreen while using the peripheral, and the reenabling it.
So our question is, how do we do it?
Do we need some extra packages in the OS build or can we do it manually. We have had a look at touchpaneldisable() and touchpanelenable(...). But the enable method requires a handle to the callback function. So I have no idea on how to fix this.
From an application perspective tehre really isn't a fix. Touchpanel ddrivers a re alittle different than otehrs becasue they get loaded by (and into) GWES, rather than device.exe. They are not designed to be disabled and enabled, though some OEMs do provide the capability (typically by just masking the touch panel interrupt).
It sounds like the touchpanel sampling rate is really high and the device is saturating the processor when it startes sampling. It's something that the OEM probably needs to fix. Some OEMs do provide registry entries to adjust the driver behavior, so check with them to see if this might be available to you. In that case you may be able to fix the issue yourself.
If you have the BSP you might want to go through this blog post as it suggest possible bottle necks for the touch driver.

Categories

Resources