LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-15-2010, 06:20 AM   #1
fahadabdillahi
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
Nat iptables problem


i Configured Dhcp server and NAT server together in one server Then DHCP server is working The clients autanatically receive DHCP from the server. then The iptables are not working and I used this commands to configure The nat.
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
service iptables restart
That is my problem The NAT isnot working and is not translatining inside local ip
 
Old 12-15-2010, 06:33 AM   #2
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

Rep: Reputation: 58
You might try source-natting:
Code:
 $IPTABLES -t nat -A POSTROUTING  -o $LOCALIF  -j SNAT --to aa.bb.cc.dd
 
  


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
IPTables NAT Problem pshoaf Linux - Networking 1 10-21-2010 12:30 PM
Iptables NAT routing problem marpel Linux - Security 10 05-09-2006 07:23 AM
iptables nat 1 to 1 problem ched Linux - Networking 1 04-27-2005 07:27 PM
Iptables FORWARD or NAT. problem. aronnok Linux - Networking 0 01-30-2005 04:57 AM
iptables NAT problem dave92082 Linux - Networking 1 06-16-2004 05:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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