LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2003, 03:53 PM   #1
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Rep: Reputation: 30
NAT newbie question


Most of what I know about networking is in Windows-land, but I wanted to set up a firewall to block out windows vulnerabilities, so for added security, I decided to make a Linux box instead of buying a router. (Plus, I can run apache and test vBulletin betas on it )

I don't know much about Linux networking, having played around with it primarily as a desktop OS, but I have a couple of Linux administration books, and in one, I found the following hack for NAT (entered into /etc/rc.d/rc.local):

Quote:
ipchains -P forward DENY
ipchains -A forward -i eth1 -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward
Now, I don't understand a bloody thing about what that does, except that I changed ppp0 to eth1 because eth1 is my secondary NIC, which will be connected to the internet. (eth1's a cheap 10 mbps NIC); I'm hoping that I don't have to say anything about eth0 (my internal network interface, on a 10/100 NIC, which goes to a switching hub)

I also included insmod lines for ftp, irc, quake, raudio, and vdolive, since those were listed in my book, and I want this NAT server to be as non-restrictive towards what I can do on the internet as possible...I just don't want anybody from the internet getting into my client machine.

Now, I have a couple of pop email addresses that don't have SMTP servers to go with them, and my ISP won't forward any SMTP requests from email addresses other than my own, so I had Peer Web Services set up on my client machine (Windows XP Pro) and was running my own SMTP server to date.

1) With that NAT implementation, will that SMTP server still function on my XPee box?

2) Is there an easy way to set up a simple SMTP server in Linux? My server's a complete piece of crap (it's got all the hardware that's not good enough to go into my main computer...I do have X installed on it, but it usually takes less than a minute to crash once I fire up X), so I'd prefer a solution that can be implemented *entirely* from the command line. Yes, I have pico installed, so I don't care if there's heavy-duty configuration file editing. I'd prefer to set it up so that the SMTP server will send any messages coming from my client machine (i.e., through eth0) but deny forwarding for anything on the internet.

Last note: feel free to use networking jargon; I do know the basics of networking (well enough to pass CompTIA Network+), it's just Linux networking I'm not so hot on.
 
Old 09-22-2003, 04:07 PM   #2
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
1) Yes
2) Yes, install postfix

3) Install a new distro of linux with iptables

RH9, Mandrake 9, etc.

4) Click my sig link for an easy masq setup
5) Email / AIM me if you want a more indepth explanation
 
Old 09-22-2003, 07:08 PM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
if you are running RedHat 8.0 you should have iptables installed (if not, recompile your kernel and add it), don't use ipchain, it is old, out-dated. iptables is far better.
 
Old 09-23-2003, 07:38 AM   #4
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Original Poster
Rep: Reputation: 30
Yeah, it actually is an iptables hack, I typed from the book, and both are 3-line hacks that appear on the same page ><
 
Old 09-26-2003, 11:52 AM   #5
ehpserver
Member
 
Registered: Sep 2003
Posts: 38

Rep: Reputation: 15
firestarter.sourceforge.net

It is all in one GUi solutions for your questions. with few mouse cliks you can setup NAT / firewall / ports to block , ports to open , forward prots etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nat Question keefaz Linux - Networking 3 08-25-2008 03:55 AM
NAT and DNS Question whohasit Linux - Networking 1 07-19-2005 10:29 PM
nat question gubak Linux - Networking 2 03-01-2005 06:54 AM
routing, nat question? pudhiyavan Linux - Networking 5 02-06-2005 01:35 PM
NAT startup question WorldBuilder Linux - Networking 4 05-15-2003 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration