A concrete example will help here -- or at least demonstrate I don't understand your question.
To use the SOCKS proxy provided by the SSH suite of tools, you need three things:
SSH server listening on a remote computer
SSH client that supports the SOCKS proxy feature -- PuTTY in your case
Other software that can use a SOCKS proxy; we'll use Firefox as an example
If you have all these pieces, you can browse through the SOCKS proxy this way:
Configure PuTTY to run a SOCKS proxy on localhost, port 5555.
Initiate an SSH session from PuTTY to the remote server. The proxy server is not available until you do this.
Configure Firefox (Preferences | Network Settings) to use the SOCKS proxy on localhost, port 5555.
If all this succeeds, then Firefox will hand its HTTP/S requests to the SOCKS proxy PuTTY is running locally. PuTTY will forward the requests to the remote SSH server. The remote SSH server will issue the HTTP/S requests as though they originated from the remote system and return the results across the SSH session. The proxy server on PuTTY will hand those results back to Firefox.
The local network only sees the encrypted traffic between PuTTY (the SSH client) and the remote SSH server.
Thanks. OP will definitely want to go down this road instead if it is available.
FWIW, ProxyJump and the -J option is not available in some older LTS releases (xUbuntu 16.04, for instance), but it is certainly there in the most recent.
Yes, definitely an option. The configuration I gave works nicely when you're connecting to multiple systems behind the jump host and you want some flexibility when you do that.
But you have a point: if OP just needs to get to a prompt on the one system, SSH home and then SSH to work.
Ah, yes. It definitely requires the always-on machine running an OpenSSH server at your house. This can be the cheapest, headless contraption you can get your hands on. Literally, a Raspberry Pi would suffice.
This is not uncommon. Use your house as a "jump host." I'll show you the old way I used to do it, but google around because I gather there are more efficient ways to do this now.
Place the following in your .ssh/config file:
Host home
Hostname home.example.com
DynamicForward localhost:5555
Host work
Hostname *.work.example.com
ProxyCommand /bin/nc -x localhost:5555 %h %p
First you SSH into your home in one terminal:
ssh home
That sets up a SOCKS proxy.
Now when you SSH into any computer with a host name that ends with work.example.com, it will make the connection through your house across that SOCKS proxy with the aid of netcat (nc).
If you are working on Debian/Ubuntu based systems, you will need the netcat-openbsd package installed as well.
It is not unusual to have outside SSH access only to one computer on a network and then use that machine as the gateway or jump host to others. The only difference in your case is that the jump host is your house.
Wow. Nicely done. I actually spent some time looking for this yesterday and came up empty-handed. I'm glad you knew what it was. OP peaked my interest.
The website is a "service provider" and as long as the service provider does not redistribute the utilities they use in the background they do not incur any of the obligations that come along with older versions of the GPL. At least that seems to be the sense people got reading GPLv2.
Take a look at the history behind the Affero General Public License (AGPL). The "loophole" you identified has been the subject of serious discussion.
IANAL and I take no position on what is good or what is bad here.
This is probably a little too hard core, but I use Owncloud for synchronization and vim (:X) for encrypted text files. If I need this on the phone, I usually ssh into the machine where I want to edit it.
However, there is an Owncloud client for Android and vim in Termux supports encryption. (It appears that VIMTouch does not support encryption; that's the graphical vim for Android.) Of course, you want the Hacker's Keyboard if you go down this path.
The links are for the corresponding apps in the F-Droid repository. Each of those is available from Google Play if you prefer.
This is basically it. If you have a Linux machine that plays the role of file server or mail server, for instance, you need to scan files passing through it to make sure you keep the poor, defenseless Windows users safe.
This and, as OP observed, sometimes you are required to have AV, no matter how pointless the requirement. A PCI environment (processes credit cards) is sometimes such an environment -- although even there, you might be able to argue that the intrusion detection suffices.
All that said, we Linux users shouldn't be complacent. The typical desktop distribution is not impenetrable. But like OP, I haven't seen the need for AV in 15 years of desktop use, and I'm flabbergasted that anyone would consider an operating system usable if it required such a resource-intensive guardian in place just to make basic usage safe.
As several others have mentioned, we need a little more detail. But let's assume you just want to forward traffic between those two networks. (I'm also betting your first subnet is really 192.168.2.0/24?)
If that is the case, NAT is unnecessary. You are working with two subnets in the private IP address range. Verify the machine sees both networks. Run the command:
ip route show
And you should see two lines that look something like this:
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.1
192.168.2.0/24 dev eth1 proto kernel scope link src 192.168.2.1
Then you just enable forwarding. Short version, to enable it immediately:
echo 1 > /proc/sys/net/ipv4/ip_forward
And then edit /etc/sysctl.conf to make that change permanent.
You may have to edit routing tables for computers on the two networks so they know that this machine is the gateway between the two subnets.
At this point you can add additional rules via iptables to determine what kind of traffic is allowed to pass between the networks. Packages such as Shorewall might help, but they are also unnecessary for a very simple configuration.
This gets more complicated if the machine you are setting up is also your gateway to the outside world. In that case, you would have three interfaces, one for each of your two local networks, and one for your outside connection. That is when you need to start considering NAT, and it is also when you seriously want to consider tools that help you set it up.
Regarding autossh, it is simply another layer around SSH. When SSH has done all it can to maintain a connection and failed (and that does happen), autossh is an additional layer that tries to re-establish the connection. You can use autossh to set up an independent monitor of the status of the SSH connection.
You can use autossh to maintain a connection across a less reliable network when the connection needs to stay up permanently. When you get to that point, though, it is probably time to start considering OpenVPN as a possible alternative.
Finally, the command you are running is actually "ssh -N -R 2222:localhost:22 ...", right? In other words, -N and -R are reversed, are they not? "2222:localhost:22" is the value passed to "-R".
Edit: Geez, this was long. TLDR: the differences are under the hood. If you're just looking for a desktop distribution, the learning curve could be minimal.
I'm currently in the process of taking a business the other way, from OpenSuSE to Ubuntu Server. I noticed a couple of differences, but this may be colored just by the packages I had experience with.
The Debian-based world is relatively hard core about where things like configuration go. They bring in projects and they hammer them into the Debian interpretation of the File System Hierarchy. Configuration will be forced into /etc, for instance, no matter where the project put it by default. If you are familiar with the Debian way of doing things and you like it, then it is a good thing.
The postgresql packages used to be an example of this. Debian forces its configuration into /etc/postgresql. OpenSuSE leaves it in /var/lib/pgsql. It was my experience that Debian and Ubuntu tended to handle the transition from one version of PostgreSQL to the next better than OpenSuSE. However, if you're out to see how the original open source project itself meant for things to be organized, OpenSuSE might be a better option.
Nothing compares to the sheer volume of open source projects packed into the Debian repositories. Even if it is an obscure GIS-related project or a virtually defunct SOCKS proxy, Debian is likely to have it. You may have to do some scrounging with OpenSuSE and get familiar with OBS. That said, I could generally always find what I needed for OpenSuSE.
This may not matter if you were on Debian Testing, but until very recently, even with the Evergreen option, the OpenSuSE release lifetime did not match Debian or Ubuntu Server LTS. If that becomes your overriding concern, though, CentOS starts to look attractive. And the situation is very different for OpenSuSE now with the option to choose between Tumbleweed and Leap.
Finally, regarding zypper and apt, I never really encountered anything in one I could not do just as well in the other. Be sure to grab a copy of the Zypper cheat sheet. YaST was interesting, sometimes helpful, sometimes not, paticularly when I found myself really wanting to put my hands on the configuration file. (It was always there; I just wasn't always sure where to find it.) YaST's saving grace is that it works just as well at the command line as it does in the GUI.
If it is animated you could examine just the first frame with something like this:
identify -format "%m\n" test.jpg | head -n 1
But at that point the recommendation /u/amauk gives is probably more straight forward.
Doing this in Python should be no problem. You can shell out to do the identification with the os.system() command ... although there is probably a Python library that gives better access to that.
You have to learn Bash. It is far too ubiquitous; you are going to encounter it everywhere.
The only strident "better than Bash" claims I have heard come from the Zsh crowd. I have not drunk their kool aid yet. If you are looking for another shell where you will personally spend a lot of time, though, that is probably the place to start looking. (Programmable tab completion is a feature its users often tout.)
There was a bash vs. zsh discussion here on Reddit a few years back. Google "bash vs zsh" for more along those lines.
Finally, if you are working in the Debian world, be aware there is another shell called Dash that lurks in the background. Many scripts are written for it. It is frequently the default if you start your script with "#!/bin/sh". You would not normally live in Dash, but if a script fails to run, it may have to do with differences between Bash and Dash.
There is a way to install Debian remotely in place of the existing operating system. Take very seriously the statement, "These instructions are not for the weak of heart."
But it is a fun learning experience, especially if it is not the end of the world if the reboot fails. I used it once a decade ago to convert a RedHat system halfway across North America from me.
In this case, I assume you would install Debian on top of Debian.
You can specify the location of the notebook with Zim. I have about eight notebooks, most in ~/Notes, but some in a few other places. All you have to do is backup the directory for each specific notebook.
I have my notebook directories configured to back up to my Owncloud instance. It works well. I can edit a notebook on my main computer, grab the smaller laptop to run off to a meeting and my most recent notes are there.
I configure the Owncloud client to ignore .zim/* and notebook.zim. The way I can have independent locations and configurations on each computer, but the content is the same.
Yes, definitely. If you can SSH into a computer, you can transfer files to it (barring any strange configuration changes to the SSH server).
As one person has already said, scp is the first and most obvious possibility. But you may also want to explore sftp and especially rsync. You can even mount remote directories with sshfs.
Many of the graphical file managers allow you to use some combination of scp/sftp to move files as well. There are some dedicated GUI applications such as gFTP. Finally, if you are unfortunate enough to have to deal with Windows, look into WinSCP.
You may be right ... although in my experience the "random" user is frequently shocked to learn they could just type CTRL-C to get the same effect as Edit | Copy. Keyboard shortcuts are the last thing they plan to remember. (Their loss, of course.)
But I admit to a certain codger-like impulse here: why can't everybody think like they started on a VT-100 terminal? ;)
That said, I think the point by /u/Alkotronikk stands. There is a different set of expectations as soon as you drop to a terminal. "CTRL-C means abort" is definitely one of those.
cut, copy and paste using the industry standard ctrl-x, ctrl-c and ctrl-v
Hmmm ... "industry standard."
CTRL-C has almost certainly meant "abort" longer than it has meant "copy." It used to scare me to type CTRL-C for copy. I'm over that now, but perfectly content to type CTRL-SHIFT-C for copy in a terminal. (EDIT: I probably hit SHIFT with just a little extra emphasis: ie., "Get it, terminal? I don't mean CTRL-C!")
Further reading. Note the command line interfaces were far more common than graphical in my experience in the late 80s and early 90s.
The dream for me is to have one phone-size computer. I plug into a keyboard and monitor for regular work. I grab it and go for the rest of the day.
I tend to use minimalist desktops. I don't usually need a lot of horsepower for the things I do. (And that extends to processing GIS data in PostgreSQL/PostGIS databases!) For most things I do, the "computer" in my phone is quite adequate.
Several things still stand in the way:
HDMI support was unsatisfactory in my earliest smart phone, and nonexistent in my later phones.
For coverage reasons, I'm stuck with a provider that effectively prevents rooting my phone (after all, I did sign an agreement that said I wouldn't).
Non-mobile, desktop web interactions might actually tax the resources of my phone; those interactions just seems to get more and more resource hungry.
So for the time being, I'm left experimenting with things such as GNURoot Debian (proot is amazing, but it has its limitations on Android), and using my phone to make calls (gasp!), do some light browsing, and play the occasional, casual game ... even though the processing power in my phone probably matches or exceeds a Cray Y-MP. (And it cost two or three times the Chromebook turned Xubuntu laptop I'm typing this on.)
This is roughly the order I reach for a tool to draw a diagram, partly based on my own lack of competence:
LibreOffice Draw -- I need it fast, it's not too complicated, or it involves connectors between items on the diagram.
Inkscape -- I have a little more time, the drawing is complex, I want to turn layers on and off, I need maximum flexibility (and connectors are getting better). The tutorials that ship with Inkscape are a good starting point.
PGF/Tikz -- I have plenty of time and I want to blow people away (not to mention astounding them when I show them the "source").
PGF/Tikz wins no awards for ease of use (the manual is just slightly over 1,000 pages!), but it is truly amazing what people accomplish with it.
A tool called Dia is probably worth mentioning, but I have only used it for database and UML-like drawings. I have never had it "click" for me.
I would not use Gimp for diagrams. It is absolutely the right tool for image manipulation, but not drawing diagrams.
Synfig was the 2D open source option that immediately came to my mind. It is under active development. One of the recent enhancements was support for skeletal structures.
OpenVPN has a "redirect-gateway" option that does this automatically.
The details are provided in the OpenVPN man page. I would not normally direct somebody there, but it describes succinctly and precisely what you need to do for any VPN implementation. That option will:
Automatically execute routing commands to cause all outgoing
IP traffic to be redirected over the VPN.
This option performs three steps:
(1) Create a static route for the --remote address which
forwards to the pre-existing default gateway. This is done
so that (3) will not create a routing loop.
(2) Delete the default gateway route.
(3) Set the new default gateway to be the VPN endpoint
address (derived either from --route-gateway or the
second parameter to --ifconfig when --dev tun is specified).
When the tunnel is torn down, all of the above steps are
reversed so that the original default route is restored.
That first step is important. You want to redirect all traffic ... except the traffic that maintains the VPN connection!
If OP has problems with space, a modular approach is usually better suited.
Definitely. Given OP's target specs, something like the Postfix/Dovecot solutions recommended in other posts really are the best way to go. Take away the web interface, and things can be substantially more light-weight.
A concrete example will help here -- or at least demonstrate I don't understand your question.
To use the SOCKS proxy provided by the SSH suite of tools, you need three things:
If you have all these pieces, you can browse through the SOCKS proxy this way:
If all this succeeds, then Firefox will hand its HTTP/S requests to the SOCKS proxy PuTTY is running locally. PuTTY will forward the requests to the remote SSH server. The remote SSH server will issue the HTTP/S requests as though they originated from the remote system and return the results across the SSH session. The proxy server on PuTTY will hand those results back to Firefox.
The local network only sees the encrypted traffic between PuTTY (the SSH client) and the remote SSH server.
Thanks. OP will definitely want to go down this road instead if it is available.
FWIW, ProxyJump and the -J option is not available in some older LTS releases (xUbuntu 16.04, for instance), but it is certainly there in the most recent.
Yes, definitely an option. The configuration I gave works nicely when you're connecting to multiple systems behind the jump host and you want some flexibility when you do that.
But you have a point: if OP just needs to get to a prompt on the one system, SSH home and then SSH to work.
Ah, yes. It definitely requires the always-on machine running an OpenSSH server at your house. This can be the cheapest, headless contraption you can get your hands on. Literally, a Raspberry Pi would suffice.
This is not uncommon. Use your house as a "jump host." I'll show you the old way I used to do it, but google around because I gather there are more efficient ways to do this now.
Place the following in your .ssh/config file:
First you SSH into your home in one terminal:
That sets up a SOCKS proxy.
Now when you SSH into any computer with a host name that ends with work.example.com, it will make the connection through your house across that SOCKS proxy with the aid of netcat (nc).
If you are working on Debian/Ubuntu based systems, you will need the netcat-openbsd package installed as well.
It is not unusual to have outside SSH access only to one computer on a network and then use that machine as the gateway or jump host to others. The only difference in your case is that the jump host is your house.
Wow. Nicely done. I actually spent some time looking for this yesterday and came up empty-handed. I'm glad you knew what it was. OP peaked my interest.
The website is a "service provider" and as long as the service provider does not redistribute the utilities they use in the background they do not incur any of the obligations that come along with older versions of the GPL. At least that seems to be the sense people got reading GPLv2.
Take a look at the history behind the Affero General Public License (AGPL). The "loophole" you identified has been the subject of serious discussion.
IANAL and I take no position on what is good or what is bad here.
This is probably a little too hard core, but I use Owncloud for synchronization and vim (:X) for encrypted text files. If I need this on the phone, I usually ssh into the machine where I want to edit it.
However, there is an Owncloud client for Android and vim in Termux supports encryption. (It appears that VIMTouch does not support encryption; that's the graphical vim for Android.) Of course, you want the Hacker's Keyboard if you go down this path.
The links are for the corresponding apps in the F-Droid repository. Each of those is available from Google Play if you prefer.
This is basically it. If you have a Linux machine that plays the role of file server or mail server, for instance, you need to scan files passing through it to make sure you keep the poor, defenseless Windows users safe.
This and, as OP observed, sometimes you are required to have AV, no matter how pointless the requirement. A PCI environment (processes credit cards) is sometimes such an environment -- although even there, you might be able to argue that the intrusion detection suffices.
All that said, we Linux users shouldn't be complacent. The typical desktop distribution is not impenetrable. But like OP, I haven't seen the need for AV in 15 years of desktop use, and I'm flabbergasted that anyone would consider an operating system usable if it required such a resource-intensive guardian in place just to make basic usage safe.
As several others have mentioned, we need a little more detail. But let's assume you just want to forward traffic between those two networks. (I'm also betting your first subnet is really 192.168.2.0/24?)
If that is the case, NAT is unnecessary. You are working with two subnets in the private IP address range. Verify the machine sees both networks. Run the command:
And you should see two lines that look something like this:
Then you just enable forwarding. Short version, to enable it immediately:
And then edit /etc/sysctl.conf to make that change permanent.
You may have to edit routing tables for computers on the two networks so they know that this machine is the gateway between the two subnets.
At this point you can add additional rules via iptables to determine what kind of traffic is allowed to pass between the networks. Packages such as Shorewall might help, but they are also unnecessary for a very simple configuration.
This gets more complicated if the machine you are setting up is also your gateway to the outside world. In that case, you would have three interfaces, one for each of your two local networks, and one for your outside connection. That is when you need to start considering NAT, and it is also when you seriously want to consider tools that help you set it up.
Regarding autossh, it is simply another layer around SSH. When SSH has done all it can to maintain a connection and failed (and that does happen), autossh is an additional layer that tries to re-establish the connection. You can use autossh to set up an independent monitor of the status of the SSH connection.
You can use autossh to maintain a connection across a less reliable network when the connection needs to stay up permanently. When you get to that point, though, it is probably time to start considering OpenVPN as a possible alternative.
Finally, the command you are running is actually "ssh -N -R 2222:localhost:22 ...", right? In other words, -N and -R are reversed, are they not? "2222:localhost:22" is the value passed to "-R".
Edit: Geez, this was long. TLDR: the differences are under the hood. If you're just looking for a desktop distribution, the learning curve could be minimal.
I'm currently in the process of taking a business the other way, from OpenSuSE to Ubuntu Server. I noticed a couple of differences, but this may be colored just by the packages I had experience with.
The Debian-based world is relatively hard core about where things like configuration go. They bring in projects and they hammer them into the Debian interpretation of the File System Hierarchy. Configuration will be forced into /etc, for instance, no matter where the project put it by default. If you are familiar with the Debian way of doing things and you like it, then it is a good thing.
The postgresql packages used to be an example of this. Debian forces its configuration into /etc/postgresql. OpenSuSE leaves it in /var/lib/pgsql. It was my experience that Debian and Ubuntu tended to handle the transition from one version of PostgreSQL to the next better than OpenSuSE. However, if you're out to see how the original open source project itself meant for things to be organized, OpenSuSE might be a better option.
Nothing compares to the sheer volume of open source projects packed into the Debian repositories. Even if it is an obscure GIS-related project or a virtually defunct SOCKS proxy, Debian is likely to have it. You may have to do some scrounging with OpenSuSE and get familiar with OBS. That said, I could generally always find what I needed for OpenSuSE.
This may not matter if you were on Debian Testing, but until very recently, even with the Evergreen option, the OpenSuSE release lifetime did not match Debian or Ubuntu Server LTS. If that becomes your overriding concern, though, CentOS starts to look attractive. And the situation is very different for OpenSuSE now with the option to choose between Tumbleweed and Leap.
Finally, regarding zypper and apt, I never really encountered anything in one I could not do just as well in the other. Be sure to grab a copy of the Zypper cheat sheet. YaST was interesting, sometimes helpful, sometimes not, paticularly when I found myself really wanting to put my hands on the configuration file. (It was always there; I just wasn't always sure where to find it.) YaST's saving grace is that it works just as well at the command line as it does in the GUI.
If it is animated you could examine just the first frame with something like this:
But at that point the recommendation /u/amauk gives is probably more straight forward.
Doing this in Python should be no problem. You can shell out to do the identification with the os.system() command ... although there is probably a Python library that gives better access to that.
ImageMagick has the identify command. That will tell you whether an image is GIF or JPEG regardless of what the extension is.
I copied a GIF to the file name "test.jpg" and this is what I got:
Just be aware that if it is an animated GIF, you will get one line of output for each frame.
Edit: to take it one step further, something like this should correctly give all the false .jpg files the extension .gif:
You have to learn Bash. It is far too ubiquitous; you are going to encounter it everywhere.
The only strident "better than Bash" claims I have heard come from the Zsh crowd. I have not drunk their kool aid yet. If you are looking for another shell where you will personally spend a lot of time, though, that is probably the place to start looking. (Programmable tab completion is a feature its users often tout.)
There was a bash vs. zsh discussion here on Reddit a few years back. Google "bash vs zsh" for more along those lines.
Finally, if you are working in the Debian world, be aware there is another shell called Dash that lurks in the background. Many scripts are written for it. It is frequently the default if you start your script with "#!/bin/sh". You would not normally live in Dash, but if a script fails to run, it may have to do with differences between Bash and Dash.
There is a way to install Debian remotely in place of the existing operating system. Take very seriously the statement, "These instructions are not for the weak of heart."
But it is a fun learning experience, especially if it is not the end of the world if the reboot fails. I used it once a decade ago to convert a RedHat system halfway across North America from me.
In this case, I assume you would install Debian on top of Debian.
You can specify the location of the notebook with Zim. I have about eight notebooks, most in ~/Notes, but some in a few other places. All you have to do is backup the directory for each specific notebook.
I have my notebook directories configured to back up to my Owncloud instance. It works well. I can edit a notebook on my main computer, grab the smaller laptop to run off to a meeting and my most recent notes are there.
I configure the Owncloud client to ignore .zim/* and notebook.zim. The way I can have independent locations and configurations on each computer, but the content is the same.
Yes, definitely. If you can SSH into a computer, you can transfer files to it (barring any strange configuration changes to the SSH server).
As one person has already said, scp is the first and most obvious possibility. But you may also want to explore sftp and especially rsync. You can even mount remote directories with sshfs.
Many of the graphical file managers allow you to use some combination of scp/sftp to move files as well. There are some dedicated GUI applications such as gFTP. Finally, if you are unfortunate enough to have to deal with Windows, look into WinSCP.
You may be right ... although in my experience the "random" user is frequently shocked to learn they could just type CTRL-C to get the same effect as Edit | Copy. Keyboard shortcuts are the last thing they plan to remember. (Their loss, of course.)
But I admit to a certain codger-like impulse here: why can't everybody think like they started on a VT-100 terminal? ;)
That said, I think the point by /u/Alkotronikk stands. There is a different set of expectations as soon as you drop to a terminal. "CTRL-C means abort" is definitely one of those.
Quoting OP:
Hmmm ... "industry standard."
CTRL-C has almost certainly meant "abort" longer than it has meant "copy." It used to scare me to type CTRL-C for copy. I'm over that now, but perfectly content to type CTRL-SHIFT-C for copy in a terminal. (EDIT: I probably hit SHIFT with just a little extra emphasis: ie., "Get it, terminal? I don't mean CTRL-C!")
Further reading. Note the command line interfaces were far more common than graphical in my experience in the late 80s and early 90s.
The dream for me is to have one phone-size computer. I plug into a keyboard and monitor for regular work. I grab it and go for the rest of the day.
I tend to use minimalist desktops. I don't usually need a lot of horsepower for the things I do. (And that extends to processing GIS data in PostgreSQL/PostGIS databases!) For most things I do, the "computer" in my phone is quite adequate.
Several things still stand in the way:
So for the time being, I'm left experimenting with things such as GNURoot Debian (proot is amazing, but it has its limitations on Android), and using my phone to make calls (gasp!), do some light browsing, and play the occasional, casual game ... even though the processing power in my phone probably matches or exceeds a Cray Y-MP. (And it cost two or three times the Chromebook turned Xubuntu laptop I'm typing this on.)
This is roughly the order I reach for a tool to draw a diagram, partly based on my own lack of competence:
LibreOffice Draw -- I need it fast, it's not too complicated, or it involves connectors between items on the diagram.
Inkscape -- I have a little more time, the drawing is complex, I want to turn layers on and off, I need maximum flexibility (and connectors are getting better). The tutorials that ship with Inkscape are a good starting point.
PGF/Tikz -- I have plenty of time and I want to blow people away (not to mention astounding them when I show them the "source").
PGF/Tikz wins no awards for ease of use (the manual is just slightly over 1,000 pages!), but it is truly amazing what people accomplish with it.
A tool called Dia is probably worth mentioning, but I have only used it for database and UML-like drawings. I have never had it "click" for me.
I would not use Gimp for diagrams. It is absolutely the right tool for image manipulation, but not drawing diagrams.
Synfig was the 2D open source option that immediately came to my mind. It is under active development. One of the recent enhancements was support for skeletal structures.
OpenVPN has a "redirect-gateway" option that does this automatically.
The details are provided in the OpenVPN man page. I would not normally direct somebody there, but it describes succinctly and precisely what you need to do for any VPN implementation. That option will:
That first step is important. You want to redirect all traffic ... except the traffic that maintains the VPN connection!
Definitely. Given OP's target specs, something like the Postfix/Dovecot solutions recommended in other posts really are the best way to go. Take away the web interface, and things can be substantially more light-weight.