CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 4 - Networking Support
  HELP! iptable problem

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  ilemon
      ilemon
HELP! iptable problem
#1
Newbie
Joined: 2007/10/9
From
Posts: 3
The question is a little bit long......

System A: Centos 4.4
2 network interfaces:
“eth0” connected to Internet through a router, and IP address 192.168.0.100 is given.
“tz0” is a wireless device which can connect to System B, and it's internal IP address is 11.11.1.1 (which is known by System B)

System B: Centos 4.4
2 network interfaces:
“eth0” with no connection
“tz0” is a wireless device which can connect to System A, and it's internal IP address is 11.11.1.2 (which is known by System A)

Problem:
I want to use System A as a network gateway, or something that can redirect the Internet traffic to System B. For example, System B can browse “www.google.com” without any ethernet cable plugged in its “eth0”.

I was told that I can achive this by doing something to the iptable. And I found a website that has the following:

“> To setup the Firewall/NAT, first enable the IP forwarding, by changing the 0 to a 1 on the net.ipv4.ip_forward line of the /etc/sysctl.conf file.
>
> Then, replace the contents of /etc/sysconfig/iptables with the following:
..........................

My question are:
1.I change the net.ipv4.ip_forward's value in sysctl.conf file, but I cannot find the “/etc/sysconfig/iptables”.
2.What change should i make in the iptable if the file is found?

Thank you very much!!
Posted on: 2007/10/18 23:06
Create PDF from Post Print
Top
  •  yyagol
      yyagol
Re: HELP! iptable problem
#2
Professional Board Member
Joined: 2006/6/10
From
Posts: 868
You can just write the iptables rules and then run service iptables save
this action will save all rules to the /etc/sysconfig/iptables file .
_________________
P Save a tree...please don't print this unless you really need to
Posted on: 2007/10/22 6:41
Create PDF from Post Print
Top
  •  ilemon
      ilemon
Re: HELP! iptable problem
#3
Newbie
Joined: 2007/10/9
From
Posts: 3
thank you!
do you mean I am going to create this "iptable" file?
Posted on: 2007/10/22 21:20
Create PDF from Post Print
Top
  •  yyagol
      yyagol
Re: HELP! iptable problem
#4
Professional Board Member
Joined: 2006/6/10
From
Posts: 868
no need to create the file this will do once running the
service iptables save command

as for net.ipv4.ip_forward this line needs to go in /etc/sysctrl.conf
with a value of 0 ro 1 (net.ipv4.ip_forward=1)
_________________
P Save a tree...please don't print this unless you really need to
Posted on: 2007/11/8 6:51
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com