I can't say as to whether your second termination was fair or not. However, I know of cases where networks were compromised by exactly this means - using a privileged computer through a guest network, computer got trojaned, now there's something running on the inside of the privileged network, and bad stuff starts happening. Maybe the company overreacted by firing you, but it wasn't for trivial reasons.
You're not going to learn as from events if you fail to look at them openly. You absolutely need to look at events from the other side as well as your own, in order to grow. Sometimes you'll still decide that you were 100% in the right. But that's really rare.
Think about what you were doing. Why were you bypassing network policies? Why didn't you ask if you could do that? That's really the question to ask yourself - why didn't you feel like you could ask "hey, this policy makes no sense, can I, a smart person, do something else?"
OK, I've read all the comments to date, and I'm angry at quite a few of them.
First off, here's a simple litmus test for "is X a misogynistic industry?". Does X have 50% women working in it? If not, and there's no actual genetic reason (e.g. this is an industry of literal sperm donors), then it is VERY likely to have a strong misogynistic component. Is there a company with software engineers where 50% of them are women? Never heard of such a thing. Is there a company with software engineers and no misogynists? Never heard of that either, at least not if the company has more than 10 employees.
Second, for all of you who jumped in with "it's a mistake to jump to the assumption that it's just because of gender" - wrong. You pick the highest-order factor first, and only then do you go to lower-order factors.
Third, yes, America is far better than many other countries at gender equality, but it is merely wretched instead of abysmal. I expect roughly 50% participation in most job markets.
You can't sugar-coat and actually confront what needs to change. If sexism is the #1 factor, you fucking deal with that right up front. Humans aren't exactly the rational actors they think they are, so your ideas get less shrift than if they were presented by a man. It's bloody easy to try this, present the same ideas but by a man. Do you get the same rejection? Probably not.
Also, sometimes you need to fire people. You find the key movers that are misogynists (everyone knows who they are, it's not a surprise), and you fire them. Doesn't matter how good they are, they are preventing you from having access to 50% of the human race.
I feel for your wife, and this is a tough situation, and there are no good answers. Most people don't want to be the person that causes change, because that person typically gets all the pain and no benefit. But things need to change, and some of the comments you've received are appalling, the kind of comment that 50 years from now people are going to look at and say "how could people ever think that way?" In text books.
I wish I had some better answers. I've been struggling with this for a while. For specific cases, often the answer is to go somewhere else. If you can't go somewhere else, then if possible change laterally to a different boss who is both powerful in the company and willing to help promote/push your wife's agenda. While the tone of a company can be misogynistic, it's often just a few people, so you need to either avoid them or work around them, or counteract them.
3D Printing (a nearly infinite number of knock-on effects).
Legal drugs (prohibition is once again losing its sway).
Care for people who are 80+ years old.
Autonomous vehicles.
Space travel - I'd love to predict fortunes in it, but it's still a wildcard and a dream.
You're not going to learn as from events if you fail to look at them openly. You absolutely need to look at events from the other side as well as your own, in order to grow. Sometimes you'll still decide that you were 100% in the right. But that's really rare.
Think about what you were doing. Why were you bypassing network policies? Why didn't you ask if you could do that? That's really the question to ask yourself - why didn't you feel like you could ask "hey, this policy makes no sense, can I, a smart person, do something else?"