LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-01-2005, 01:15 AM   #1
gubak
Member
 
Registered: Jul 2004
Posts: 332

Rep: Reputation: 30
nat question


I use RedHat9 as a small office server. I use squid as a proxy, but squid is only a http proxy. I need a nat in order to use msn messenger (audio conversation). I have set it up like this:

sysctl -w net.ipv4.ip_forward=1

iptables -A FORWARD -i eth1 -j ACCEPT
iptables -A FORWARD -o eth1 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


It's work, but I have two problems:

1. The whole network can access internet without any limits
2. When I type the command "iptables -L" I can't see the line
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE and I don't know how to delete this line


My questions are:
1. What command do I need to allow internet access (through nat) only to one computer?
2. How can I list the nat table and how can I delete the nat records?

Last edited by gubak; 10-09-2006 at 01:39 AM.
 
Old 03-01-2005, 03:34 AM   #2
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
iptables -t nat -A POSTROUTING -s 192.168.0.2 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -j DENY

assuming u want to allow only computer 192.168.0.2 to be nat'ed.
 
Old 03-01-2005, 06:54 AM   #3
zsoltrenyi
Member
 
Registered: May 2004
Distribution: redhat, trustix, debian
Posts: 103

Rep: Reputation: 15
the command to see the nat table is: iptables -t nat -L
 
  


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
Stupid question about NAT Led*Zep Linux - Security 2 11-11-2005 09:52 AM
please confirm NAT question. musicman_ace Linux - Networking 3 06-02-2004 02:43 AM
NAT newbie question Citizen Bleys Linux - Networking 4 09-26-2003 11:52 AM
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 07:38 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