LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-26-2004, 04:14 PM   #1
grcunningham
Member
 
Registered: Apr 2004
Location: Florida
Distribution: RedHat 9.0/Afterstep
Posts: 103

Rep: Reputation: 15
noob cant figure out NAT


oowww!!! been banging my head on the wall

I have a very simple setup:
Fast computer:
eth0:192.168.0.1
eth1: x.x.x.x DSL

Slooow computer
eth0: 192.168.0.2

the DSL works great on the fast computer, and the
two computers communicate fine(I can ping, use NFS,ssh, etc)

Ive been on Netfilter.org all day reading about iptables, reading
HOWTO's, etc, and trying all the sample scripts...
unfortunately, all these samples are pages and pages long, with
lots of stuff i have no clue about (mangling, etc)

ive seen on forum posts where people say that it only took them 4
lines and it was working fine, i dont get it
I realize that i will have to do firewalling also, but first i would at
least like to be able to ping yahoo.

can anyone point me in the right direction, or let me know where
there is a HOWTO thats less than 50 pages? the Iptables Tutorial 1.1.19
im reading now is 150 pages!!!
thanks
 
Old 05-26-2004, 04:33 PM   #2
grcunningham
Member
 
Registered: Apr 2004
Location: Florida
Distribution: RedHat 9.0/Afterstep
Posts: 103

Original Poster
Rep: Reputation: 15
found something...i used this

modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

works great....
 
Old 05-27-2004, 01:36 AM   #3
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
what about security?
u better visit www.iptables-script.dk
good luck
 
Old 05-28-2004, 04:12 AM   #4
presemt_arms
Member
 
Registered: Sep 2003
Distribution: pclinuxos pre8, dynabolic, knoppix 3.6, k12 ltsp, ubuntu
Posts: 54

Rep: Reputation: 15
i have a similiar line also which works great in 2.4.x kernel... however if i boot to 2.6.x i get an invalid argument... the line being

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to <ipaddress> where ip is the eth0 ip


i think i missed something

i usually do untill the 500th attempt... all more fun
 
Old 11-03-2004, 10:48 AM   #5
cyto
Member
 
Registered: Aug 2004
Location: London
Distribution: FreeBSD 6.0, Freebsd 5.3, Freebsd 4.10, SuSE 9.2 pro, Slackware 10.1, FreeBSD 5.4 RC3
Posts: 270

Rep: Reputation: 30
Nice title. lol
 
  


Reply



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
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
Firewall help (noob really really huge noob) ProtoformX Linux - Networking 1 03-29-2004 12:19 AM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 12:03 AM
No GUI....noob, go figure CavRider Linux - Newbie 3 09-01-2003 07:41 AM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM

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

All times are GMT -5. The time now is 02:30 PM.

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
Open Source Consulting | Domain Registration