LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-29-2004, 04:51 AM   #1
vermaamitabh
LQ Newbie
 
Registered: Oct 2004
Posts: 23

Rep: Reputation: 15
NAT doubts


Hi All,
I have some dobts about NAT(network address translation) . As i understood that NAT is used to share one internet connection in between many machines which doesnt have public ip addresses e.g. for interanet. So according to it all the out going packets from interanet to internet is masked and when response come backs for these packets it is unmasked and sent to the machine, who has initiated the request.

Here my doubt comes :
If i have properly working NAT then only the packets, which are the responses for some interanet machine request, MUST be forwarded only and any packets which has not been destinated for any interanet machine MUSt not come inside. am I right or what is the real scenerio???
If it is so then i dont need any firewall for incoming connections, is it??

If some body has idea about my doubts, please help me.
Thanks in advance
Best Regards
 
Old 10-29-2004, 05:17 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
as i know it is possible to pass your NAT box and reach the local network.
make it very hard to pass your NAT box (nothing is impossible). :
iptables -F FORWARD
iptables -P FORWARD DROP
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth_local -s local_net/subnet -j ACCEPT

so only ESTABLISHED RELATED packets will be allowed for both direction. all of packets will be allowed if they comes from intranet and goes to internet.

dont forget, someone still can find a way to hack your box. maybe iptables wont let them but maybe hacker finds a security hole in iptables or other services. who knows at least u wont be hacked by kids
 
Old 10-29-2004, 09:11 AM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
previous post gives added protection against break-ins.
The experienced guys have ways to forge packets and fooling the NAT to let through packets believing they belong to an established connection.
You firewall settings should contain some more rules to drop the most common ways of trying to get passed the firewall. Have a look at one of the many firewall scripts circling around and try to figure out how it works.
 
  


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
Doubts in c rajesh_b Programming 2 06-06-2005 09:54 PM
script doubts praveenv Linux - Newbie 1 08-14-2004 07:00 AM
Makefile doubts varala_kanth Linux - Software 0 03-25-2004 10:15 PM
slackware doubts ;-| sridharinfinity Slackware 6 10-25-2003 01:18 PM
cd playing doubts! zaba Linux - Software 0 10-05-2003 09:01 PM

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

All times are GMT -5. The time now is 12:55 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
Open Source Consulting | Domain Registration