APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Inward Bound

© June 2006 Anthony Lawrence

There's a Boston customer I have serviced for many years now. They run Unix, so there's never much to do (we Unix folk have less work than Maytag repairmen), but some years ago I had put in a small Linux server just so that some of their order entry folks could ssh in from home and then telnet to the SCO box that their app runs on. That's been chugging along for many a year on a DSL line.

Recently they decided that they needed faster Internet access and their own mail server. That seemed like the ideal time to upgrade the Linux server and install Kerio Mailserver.

The old Linux was setup as a gateway: one nic had the public ip that they would ssh to. I really do not like this configuration: I prefer hardware firewalls. As mentioned elsewhere, I also implement internal firewalls; that is, I have the hardware firewall forwarding the ports I want inward but at the Linux box I also specifically both disable and block all ports not being used.

So, on the day of the switch-over, I brought a hardware firewall and Suse Linux CD's. I first configured the firewall from information provided by Conversent and tested it with my laptop.

By the way, let me put in a plug here. I've done quite a few turnups with customers using Conversent and my experience with them really has been excellent. Support has responded quickly, accurately and intelligently every time I have had a problem. They really get high marks in my book. No, I'm not a reseller and I get nothing for saying that.

Anyway, that worked fine, so I took down the old Linux box, wired in the router and had everyone reacquire DHCP from it so that they wouldn't lose Internet access while I loaded Suse. I did a straight text install and did not install any desktop - this is a server, it doesn't need a GUI.

I configured the firewall to forward tcp ports 22 and 25 to my new Suse box. I then downloaded Kerio Mailserver and installed that. The RPM failed however because it needed libstdc++, which was not installed. I had a little difficulty figuring out what rpm was actually needed; it turns out to be compat-libstdc++. After that, Kerio ran fine.

To test, I ssh'd out to my own web site and tried telneting back to port 25. Hmm.. no response. I double checked "lsof -i:25" on the Suse, Kerio definitely was running.

Oh duh! Forgot the Suse Firewall. I added


to /etc/sysconfig/SuSEfirewall2, restarted the firewall (/etc/init.d/SuSEfirewall2_init restart) and tried again.

Still blocked.


OK, maybe there's something wrong at the firewall. I reconfigured it to send 22 to my laptop's IP and opened ssh on it. Nope, that didn't work either. It was starting to feel like it was time to check with Conversent, so I called and explained what was happening.

The tech I got checked and said everything looked fine.. maybe I had a bad firewall?

Yeah, maybe. But I reconfigured my Mac with the static IP and tried again. No firewall now, just my Mac hooked right up to the Adtran. Still did not work.

Ok, deep breaths. There has to be a reason. I started looking at network status from the external machine and immediately noticed something odd. My public ip was a 72. address, but my box said I had connected from a 209. address. That couldn't be right, so I called Conversent again. Yep, that's the way we do it, he said. Your router is bad.

Naaw. Can't be. You've NATted me, I thought. I hung up and called back again to get a different tech.

This women listened to what I said and immediately said "Sure - we must have left NAT on. I'll fix it.". Sure enough, mere seconds later I could ssh to my Mac. I disconnected, reconnected the firwall, reconfigured that and tried a telnet to port 25. Success! I then tried an ssh to the public ip. Oops: permission denied.

Well, gosh, I had forgotten to uncomment "PasswordAuthentication yes" in /etc/ssh/sshd_config. I did that and a "kill -1 `cat /var/run/sshd.init.pid`" set it working as I needed. I also denied root login while I was there and set MaxStartups 10:30:60 also. I'd rather use public keys but the remote users don't all have software that can do that.

All's well that ends well.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Inward Bound

1 comment

Inexpensive and informative Apple related e-books:

Take Control of iCloud, Fifth Edition

Take Control of High Sierra

Take Control of Apple Mail, Third Edition

Take Control of Preview

Take Control of IOS 11

More Articles by © Anthony Lawrence

Fri Jun 2 12:40:50 2006: 2064   BigDumbDinosaur

aw. Can't be. You've NATted me, I thought. I hung up and called back again to get a different tech.

This women listened to what I said and immediately said "Sure - we must have left NAT on. I'll fix it.".

Gee, sounds familiar. Only it was SBC who screwed me up by leaving NAT enabled on the router. As for Adtran routers, I use those things as doorstops. An inferior piece of crapola.


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

C++ is just an abomination. Everything is wrong with it in every way. So I really tried to avoid using that as much as I could and do everything in C at Netscape. (Jamie Zawinski)

Linux posts

Troubleshooting posts

This post tagged:





Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode