LinuxQuestions.org
Visit Jeremy's Blog.
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 07-25-2010, 11:02 AM   #16
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 151

Rep: Reputation: 23

What do you mean with disabled?
- no iptables package installed?
- not enabled during building the kernel


the first will be easy to fix I think, the second is a bit harder
or do you mean something else?
 
1 members found this post helpful.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 07-25-2010, 11:22 AM   #17
abakhiet
Member
 
Registered: Apr 2010
Location: Assiut, Egypt
Posts: 166

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by tlowk View Post
What do you mean with disabled?
- no iptables package installed?
- not enabled during building the kernel


the first will be easy to fix I think, the second is a bit harder
or do you mean something else?
Thanks for you, but i don't mean that iptables is not installed, it is installed but not enabled or it is disabled for some reasons related to my VOIP Services.
I mean :
Quote:
# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination

Chain FORWARD (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
so, it is not used yet
also selinux is disabled...
 
Old 07-25-2010, 11:59 AM   #18
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 151

Rep: Reputation: 23
ok if the iptables command works you can try this command


put a ping on a customer machine

for example

$ for ((;) ; do sleep 2; ping -c 3 -w 2 8.8.8.8;done

this will keep it running

check with 'tcpdump' on the server
# tcpdump -i eth0 icmp

# iptables -t nat -A POSTROUTING -s 10.10.10.0/24 --d ! 10.10.10.0/24 o eth0 -j MASQUERADE

then try again the tcpdump command from above


do you see any difference, if the iptables command shows the stuff from before then it is fine. That service is probably just configuring iptables. I don't remember but i think there as some wrapper scripts on redhat that will also exist on centos.

but first try to get it working before trying to make it persistent

does the ping work after the iptables line above (the part after the # symbol that I put there to show it needs to be executed as root.
 
1 members found this post helpful.
Old 07-25-2010, 03:36 PM   #19
abakhiet
Member
 
Registered: Apr 2010
Location: Assiut, Egypt
Posts: 166

Original Poster
Rep: Reputation: 15
Thanks a lot
but i need to say it works when i add the rule for natting by:
Quote:
[root@abakhiet ~]# iptables -t nat -A POSTROUTING -o eth0 -s 10.10.10.0/24 -j MASQUERADE
and the command for iptables status is:
Quote:
# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination

Chain FORWARD (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

Table: mangle
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination

Chain INPUT (policy ACCEPT)
num target prot opt source destination

Chain FORWARD (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination

Table: nat
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination
1 MASQUERADE all -- 10.10.10.0/24 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
but after some time it stops again and the output for the same command is: returns as:
Quote:
# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination

Chain FORWARD (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Thanks in advance ...
 
Old 07-26-2010, 12:00 AM   #20
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 151

Rep: Reputation: 23
so it works but is not persistent?

I found this page:
http://www.cyberciti.biz/faq/rhel-fe...tion-tutorial/

it contains:this command that can solve the problem:

# /sbin/service iptables save
 
1 members found this post helpful.
Old 07-26-2010, 05:15 AM   #21
abakhiet
Member
 
Registered: Apr 2010
Location: Assiut, Egypt
Posts: 166

Original Poster
Rep: Reputation: 15
Really Thanks for all, the problem is solved and all is OK now...
 
  


Reply

Tags
rate, routing, virtual


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
Routing Traffic to a Virtual Network Interface medized Linux - Networking 4 05-21-2010 04:12 AM
Outgoing local trafic over virtual interface has not virtual ip address :-( tkmbe Linux - Networking 3 08-25-2009 08:03 PM
Create routing between virtual interface in linux attojung Linux - Networking 2 03-13-2009 01:06 PM
routing over virtual interface noir911 Linux - Server 1 02-23-2009 10:47 AM
virtual interface routing noir911 Linux - Server 11 10-22-2008 06:11 PM


All times are GMT -5. The time now is 04:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration