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
FW_SERVICES_EXT_TCP="ssh smtp"
to /etc/sysconfig/SuSEfirewall2, restarted the firewall (/etc/init.d/SuSEfirewall2_init restart) and tried again.
Still blocked.
Arrgh.
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.
More Articles by Anthony Lawrence - Find me on Google+
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
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. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Fri Jun 2 12:40:50 2006: 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.
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar