Linux per program firewall similar to windows and mac counterparts - linux

Is it possible to create GUI firewall that works as Windows and Mac counterparts? Per program basis. Popup notification window when specific program want to send\recv data from network.
If no, than why? What Linux kernel lacks to allow existence of such programs?
If yes, than why there aren't such program?
P.S. This is programming question, not user one.

Yes it's possible. You will need to setup firewall rules to route traffic through an userspace daemon, it'll involve quite a bit of work.
N/A
Because they're pretty pointless - if the user understands which programs he should block from net access he could just as well use one of multiple existing friendly netfilter/iptables frontends to configure this.

It is possible, there are no restrictions and at least one such application exists.
I would like to clarify a couple of points though.
If I understood this article correct, the firewalls mentioned here so far and iptables this question is tagged under are packet filters and accept and drop packets depending more on IP addresses and ports they come from/sent to.
What you describe looks more like mandatory access control to me. There are several utilities for that purpose in Linux - selinux, apparmor, tomoyo.
If I had to implement a graphical utility you describe, I would pick, for example, AppArmor, which supports whitelists, and, to some extent, dynamic profiling, and tried to make a GUI for it.
OpenSUSE's YaST features graphical interface for apparmor setup and 'learning' , but it is specific to the distribution.
So Linux users and administrators have several ways to control network (and files) access on per-application basis.
Why the graphical frontends for MAC are so few is another question. Probably it's because Linux desktop users tend to trust software they install from repositories and have less reasons to control them this way (if an application is freely distributed, it has less reasons to call home and packages are normally reviewed before they get to repositories) while administrators and power users are fine with command line.
As desktop Linux gets more popular and people install more software from AUR or PPA or even from gnome-look.org where packages and scripts are not reviewed that accurately (if at all) a demand for such type of software (user-friendly, simple to configure MAC) might grow.

To answer your 3rd point.
There is such a program which provides zenity popups, it is called Leopard Flower:
http://sourceforge.net/projects/leopardflower

Yes. Everything is possible
-
There are real antiviruses for linux, so there could be firewalls with GUI also. But as a linux user I can say that such firewall is not needed.

I reached that Question as i am currently trying to migrate from a Mac to Linux. There are a lot of applications I run on my Mac and on my Linux PC. Some of them I trust fully. But others I am not fully trusting. If they are installed from a source that checks them or not, do i have to trust them because someone else did? No, I am old enough to choose myself.
In times where privacy is getting more and more complicate to achieve, and Distributions exist that show that we should not trust everyone, I like to be in control of what my applications do. This control might not end at the connection to the network/Internet but it is what this question (and mine is about.
I have used LittleSnitch for MacOSX in the past years and I was surprised how often an application likes to access the internet without me even noticing. To check for updates, to call home, ...
Now where i would like to switch to Linux, I tried to find the same thing as I want to be in control of what leaves my PC.
During my research I found a lot of questions about that topic. This one, in my opinion, best describes what it is about. The question for me is the same. I want to know when an application tries to send or receive information over the network/internet.
Solutions like SELinux and AppAmor might be able to allow or deny such connections. Configuring them means a lot of manual configuration and does not inform when a new application tries to connect somewhere. You have to know which application you want to deny access to the network.
The existence of Douane (How to control internet access for each program? and DouaneApp.com) show that there is a need for an easy solution. There is even a Distribution which seems to have such a feature included. But i am not sure what Subgraph OS (subgraph.com) is using, but they state something like this on there website. It reads exactly like the initial question: "The Subgraph OS application firewall allows a user to control which applications can initiate outgoing connections. When an unknown application attempts to make an outgoing connection, the user will be prompted to allow or deny the connection on a temporary or permanent basis. This helps prevent malicious applications from phoning home."
As it seems to me, there are only two options at the moment. One is to Compiling Douane manually mysqlf or two, switch distribution to Subgraph OS. As one of the answers state, everything is possible - So i am surprised there is no other solution. Or is there?

Related

Setting up a Developers' environment in a second domain

This may be the wrong forum to ask this question. If so, I'd love links or suggestions as to where to post it.
Background:
In our current environment, developers have Windows desktop machines with decent though not crazy specs and wired Ethernet. Enough to develop, compile, test, commit, etc.
We'll be moving to a new environment (not our choice!) where the desktops are replaced by wifi-only laptops and no fixed workstations. That means, e.g. a dev cannot start a long-job at 5 pm, go home while it runs and have it finish by 8 am the next day, since the wifi connection will be broken. This is an issue for us. An additional complication is that the work is often cross-AD-domain.
Questions:
We're brainstorming other options. Some ideas that have come up:
keep the old desktops, put 'em in a closet and let the devs RDP to them (mostly Windows, a few Linux via ssh). Wire the desktops to a second domain
put in a beefy server or two and allow multiple concurrent logins. Install the required software etc. Wire the servers to a second domain
Set up a VM per dev on a suitable host in the second domain
Containers?
Is #4 even possible? Can you spin up a container that you can remote into in GUI mode in either Linux or Windows?
What other options are worth looking at? What have others done? Trying to learn from others' experiences and not re-invent the wheel.

How did NOKIA N9 pppd to network?

When use wcdma module ,we should use ppp protocol to communicate with ppp server. But I can't see any file about ppp in NOKIA N9's filesystem.
So,How N9 use linux(harmattan) to dial to PPP server and then linked to internet ?
This question seems more suited to SuperUser.com - it is not related to programming. See the StackOverflow FAQ for more information on what kind of questions you can ask here.
Regardless of where you post a question, it would help all of us if you provided more context, preferably using full sentences. As it stands now, it is difficult to tell what your actual question is. Do you want to connect a computer to the internet using the phone? Do you want to use the phone itself to access the network?
It is also difficult to understand what the problem is. You should at least tell us what you have tried and where that failed.
Unless you pay more attention to your question, you will not get any meaningful answers. You should probably have a look here for a guide on asking questions.
You should keep in mind that hardware-related questions can usually be answered only by people that have access to that particular device. With the amount of information you are providing this question boils down to "How do I connect to a PPP server on Nokia N9?", which is impossible to answer, unless one has access to that particular phone model.
By providing more context, such as describing how the firmware in that phone is setup, you allow people that have more general experience on Linux and embedded devices to help you.
Since I do not have that particular device, I will take a shot in the dark and offer a few alternatives, in order of decreasing probability:
You may need to install additional packages. I believe that MeeGo uses Debian-style packages and the PPP-related packages may not be installed by default. You should have a look at your software repositories.
The PPP support does not have to be a module - it can be included in the main kernel binary. pppd could also be replaced by a custom binary, although that is not very common, even on embedded devices.
Are you absolutely certain that your current software configuration does not support PPP? How are you searching in the filesystem for PPP-related files? What are you expecting to find? Does using the phone UI to connect work?
There is a very slim chance that the default firmware does not support PPP at all - in that case you may have to install custom packages or even replace the firmware itself with a custom version.

Building Vpn - How and where to start

I want to code a simpe vpn as a part of my course work. I am looking for ways to start. Will be helpful if you guys could help me with resources
As a basic starting point, you need to be able to write a client/server setup in your language of choice that will transport over IP. Your VPN must also be able to present the operating system with a network interface. If you are using Linux, I suggest the tun/tap system interface. For reference, you could look at the code in qemu which does make use of those OS calls. For the encryption purposes, the OpenSSL library should be able to provide you with all the calls necessary.
I'm not sure what the ultimate requirements of your coursework are. You can build anything from a basic shared-symmetric key setup that can be quickly hacked up to the bottomless pit of trying to build a production worthy VPN system. You should mention your requirements.

Sandboxed operating system

On most operating systems today, the default is that when we install a program, it is given access to many resources that it may not need, and it's user may not intend to give it access to. For example, when one installs a closed source program, in principle there is nothing to stop it from reading the private keys in ~/.ssh and send them to a malicious third party over the internet, and unless the user is a security expert proficient in using tracing programs, he will likely not be able to detect such a breach.
With the proliferation of many closed sourced programs being installed on computers, what actions are different operating systems taking to solve the problem of sandboxing third party programs?
Are there any operating system designed from the grounds up with security in mind, where every program or executable has to declare in a clearly readable format by the user what resources it requires to run, so that the OS runs it in a sandbox where it has access only to those resources? For example, an executable will have to declare that it will require access to a certain directory or a file on the filesystem, that it will have to reach certain domains or IP address over the network, that it will require certain amount of memory, etc ... If the executable lies in its declaration for system resource requirements, it should be prevented from accessing them by the operating system.
This is a the beauty of Virtualization. Anyone performing testing or operating a questionable application would be wise to use a virtual machine.
Virtual Machines:
Provide advantages of a full Operating System without direct hardware access
Can crash or fail and be restarted without affecting the host machine
Are cheap to deploy and configure to a variety of environments
Great for using applications designed for other platforms
Sandboxes applications that may attempt to access other private data on your computer
With the seamless modes virtualization programs such as VirtualBox provide you can take advantage of Virtual Machine's sandboxing in a nearly seamless fashion.
You have just described MAC (Mandatory Access Control) in your last paragraph.
I was always curious about that too.
Nowadays mobile OSes like Android do have sandboxing built-in. When installing an app, it asks for permissions to access a set of resources/features. Windows too as far as I know, at least to some extend. It is more permissive though.
Ironically, linux and others seem to be far far away concerning "software based permissions" and are stuck in the past, which is a pity. ...at least, as far as I know. I would be pleased for someone to show me wrong and show me a "usable" open source system where application sandboxing/privileges is built-in. Currently, as far as I know, permissions are solely user based.
I think this awareness that not only users need rights to access documents but also executables need rights to access resources has been missing for several decades. It might have avoided a plague of viruses and security issues of our century.

Remote Desktop in Linux like Team Viewer

For Remote Desktop Sessions in Linux, I want to know if there something available equivalent for what Team Viewer does for windows?
The main advantage I find of Team viewer is that it can bypass firewalls, needs no NAT configurations or port forwarding rules to be setup in the router.
One of the vnc family?
You will have to make the computer visible to the client machine, if you don't want to mess around with firewalls you will need a third party reflector service to connect both of you.
The price of dog food being what it is, we should probably plug copilot, although there are probably a bunch of free ones.
Erm, TeamViewer is not only for Windows - besides full Mac implementation, it also has Linux support (although it's beta). I haven't tried, but... Did you?

Resources