LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2011, 01:06 AM   #1
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Rep: Reputation: 1
ip forwading issue


hi

i have 2 lan card one connected to lan and other to isp and make the same pc as gateway but when i restart network service shows error Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0 but i checked etc.sysctl.conf it shows net.ipv4.ip_forward =1 .

pls help

Regards
Amar
 
Old 06-30-2011, 01:09 AM   #2
Lexus45
Member
 
Registered: Jan 2010
Location: Kurgan, Russia
Distribution: Slackware, Ubuntu
Posts: 352
Blog Entries: 3

Rep: Reputation: 47
To enable the changes made in sysctl.conf you will need to run the command:

Code:
sysctl -p /etc/sysctl.conf

Last edited by Lexus45; 06-30-2011 at 01:14 AM.
 
1 members found this post helpful.
Old 06-30-2011, 03:09 AM   #3
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi
i run command it shows -
login as: root
root@172.16.1.24's password:
Last login: Thu Jun 30 10:24:25 2011 from 172.16.1.22
[root@venus ~]# sysctl -p /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456

and then restart network service as folows shows error

service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
[ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]


Regards
Amar
 
0 members found this post helpful.
Old 06-30-2011, 03:26 AM   #4
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi
i run command it shows -
login as: root
root@172.16.1.24's password:
Last login: Thu Jun 30 10:24:25 2011 from 172.16.1.22
[root@venus ~]# sysctl -p /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456

and then restart network service as folows shows error

service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
[ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]


Regards
Amar
 
0 members found this post helpful.
Old 06-30-2011, 06:49 AM   #5
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi

Anyone reply pls

Amar
 
0 members found this post helpful.
Old 06-30-2011, 04:02 PM   #6
saifelyzal
LQ Newbie
 
Registered: Jun 2011
Distribution: Redhat
Posts: 28

Rep: Reputation: Disabled
did you check your iptables maybe its blocking you from forwarding
 
Old 06-30-2011, 05:31 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,956

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by amartlk View Post
hi

Anyone reply pls

Amar
As you've been told in other threads of yours, don't bump your own threads over and over. You posted at 2:09, 2:29, and 5:49...do you think that everyone just sits here, waiting for you to post? We VOLUNTEER our time here...don't pester us to hurry up and answer you. And spell out your words.

In another thread of yours, you were told to check your IP tables...it was suggested here too. HAVE YOU DONE SO??
 
0 members found this post helpful.
Old 07-01-2011, 01:03 AM   #8
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi
sorry for same, pls guide how to check the iptable block ip forwading


Regards
Amar
 
0 members found this post helpful.
Old 07-01-2011, 04:52 AM   #9
Lexus45
Member
 
Registered: Jan 2010
Location: Kurgan, Russia
Distribution: Slackware, Ubuntu
Posts: 352
Blog Entries: 3

Rep: Reputation: 47
Quote:
Originally Posted by amartlk View Post
hi
sorry for same, pls guide how to check the iptable block ip forwading


Regards
Amar
Do as root (or via sudo, if it's configured):
Code:
iptables -L FORWARD -n

Last edited by Lexus45; 07-01-2011 at 04:53 AM.
 
Old 07-01-2011, 06:17 AM   #10
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi

the above command shows --

iptables: no chains /target/match by name
 
0 members found this post helpful.
Old 07-01-2011, 11:42 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,956

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by amartlk View Post
hi
sorry for same, pls guide how to check the iptable block ip forwading
Regards
Amar
Seriously?? You apologize for it, then KEEP ON DOING IT?? Once again you need to SPELL OUT YOUR WORDS. It's "please", not "pls"...if you're not going to display basic posting etiquette, why should we answer your questions??

Again, you don't say what version/distro of Linux you're using. CentOS has had an issue with this.

The /etc/init.d/network contains a small check:
Code:
if ['cat /proc/sys/net/ipv4/ip_forward' !=0]; then
action $"Disabling IPv4 packet
forwarding:" sysctl -w net.ipv4.ip_forward=0
Even if you change the net.ipv4.ip_forward to be 1, when the scripts runs it'll be disabled. Changing it to:
Code:
if ['cat /proc/sys/net/ipv4/ip_forward' !=1]; then
action $"Enabling IPv4 packet
forwarding:" sysctl -w net.ipv4.ip_forward=1
and adding "echo "1" > /proc/sys/net/ipv4/ip_forward" to /etc/rc.local, should get it to live through a reboot.
 
Old 07-01-2011, 11:55 AM   #12
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,836

Rep: Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360
Quote:
Originally Posted by TB0ne View Post
Again, you don't say what version/distro of Linux you're using.
Its "Distribution" not "Distro."

Pls spell out your words.

What distribution is this that we are trying to figure out the forwarding on anyway?
 
0 members found this post helpful.
Old 07-01-2011, 02:18 PM   #13
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,672
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Quote:
Originally Posted by szboardstretcher View Post
Its "Distribution" not "Distro."
Pls spell out your words.
"Distro" refers to the "short form" of "Distribution": http://en.wikipedia.org/wiki/Distro
So it is NOT wrong to use it here.

"Pls" is NOT the short form of "Please", at least. "Pls" kind of words are used in SMS language, and that too because the keypad of a phone is uncomfortable to type in the whole word. But when you are on a technical fora, you are expected to behave yourself.

BTW, try to practice whatever you preach to others.
 
2 members found this post helpful.
Old 07-01-2011, 02:27 PM   #14
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,836

Rep: Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360Reputation: 1360
Quote:
Originally Posted by Anisha Kaul View Post
"Pls" is NOT the short form of "Please", at least. "Pls" kind of words are used in SMS language, and that too because the keypad of a phone is uncomfortable to type in the whole word. But when you are on a technical fora, you are expected to behave yourself.
Merriam-Webster, a little company that writes a certain book, although I forget the title -- says that "pls" IS a short form of Please. Times are changing sir, pls try to keep up.

As seen here: http://www.merriam-webster.com/dictionary/pls

And, aside from asking what "Distribution" the OP was using, so that I would be able to help him with his issue,.. I was just kidding around about the Distro/Pls thing, I couldn't care less about it. Which is why I used "pls" in my post. So IMO I was j/k about the whole thing hoping to get some lulz or perhaps make you ROFL, so pls don't be mad.

I'd still like to know what distro the OP is using. OP?

Last edited by szboardstretcher; 07-01-2011 at 02:30 PM.
 
1 members found this post helpful.
Old 07-02-2011, 03:12 AM   #15
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
hi guru

I have centos os installed , i cant understand where need to change in network script , pls suggest



Regards\
Amar
 
  


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
IP Forwading ( how to with Iptables ) ? san_patil Linux - Networking 4 04-27-2011 11:15 PM
Iptables - Port Forwading SouthernSoul Linux - Networking 5 04-25-2010 05:08 PM
iptables (IP-Forwading) jay123 Linux - Networking 3 12-09-2008 06:23 AM
Port Forwading slack66 Slackware 1 02-19-2007 08:01 AM
Ip forwading questiong Radicalm16 Linux - Networking 5 11-25-2003 10:22 PM


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