LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Network Connection Profiling- Ubuntu (https://www.linuxquestions.org/questions/linux-security-4/network-connection-profiling-ubuntu-4175457635/)

karnamonkster 04-10-2013 06:53 AM

Network Connection Profiling- Ubuntu
 
Hi,
I am looking for configuration which enables the laptop to identify the network i.e. Office LAN, VPN and Home(Internet) when connected to them respectively. Also required is it opens and blocks certain ports based on the connectivity.
For example i need to enable SSH while i am on office network and block it once i am over the internet.
Is there any way i can get hold of a script around Iptables?

Please help.

Pearlseattle 04-22-2013 02:52 PM

Hi
Independently from the script(s) that you want to run when you dis/connect, you could try using "wicd" to manage your connections and their related scripts.
I'm personally not using this feature but I see that when you click on the "properties" button of a specific connection (using the "wicd-gtk" built-in frontend) there is another button called "Scripts" which allows you to configure scripts that are can be triggered on different events:
- before connecting
- after having connected
- before disconnecting
- after having disconnected.

Maybe "NetworkManager" has as well such options, but I'm always using wicd because I find it easier... .
Cheers


All times are GMT -5. The time now is 08:58 AM.