LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-26-2008, 05:11 PM   #1
mikanoot
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
NAT Problems


I could use some help setting up NAT so I can connect to the internet from a second computer.

I have 2 computers. I set one up to be 192.168.0.1 and the other 192.168.0.3

The second computer has 2 NICS DHCP works and I can connect to the internet.

This is my firewall setup.

Code:
iptables -P INPUT DROP
iptables -P FORWARD DROP

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT

iptables -A INPUT -p icmp -j ACCEPT

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
I don't know what else to setup. I am not sure about GATEWAYS or anything else related to this. Could someone walk me through a proper configuration.

Using Slackware 12
 
Old 08-27-2008, 02:29 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I don't think NAT is going to help you achieve connection from an internal computer on private LAN to outside world. NAT is network address translation, it really plays no part in how you are connecting to the outside world.

How or where do these machines connect to? A switch or router? Is one of the machines acting as a gateway or route to the other one?
 
Old 08-28-2008, 06:33 PM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
How about a diagram of your LAN -- here's how I draw them:
http://www.linuxquestions.org/questi...02#post3164402
http://www.linuxquestions.org/questi...30#post3161630
 
  


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
Azureus / NAT - problems Ayabara Linux - Networking 2 01-22-2006 02:38 PM
problems with nat alaios Linux - Networking 3 11-17-2004 09:03 PM
problems with iptables NAT figjam Linux - Networking 1 06-14-2004 07:49 PM
Double NAT Problems... Kaashar Linux - Security 6 03-12-2004 10:54 AM
iptables...NAT...and problems... Bug Linux - Security 6 12-31-2003 03:31 AM

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

All times are GMT -5. The time now is 05:25 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