LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-15-2011, 12:01 PM   #1
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Rep: Reputation: 1
ip forwarding doesn't work


Hi

I have 2 guest machines on 1 VBox host installed :
- one guest with hostname 'debian' is configured as follows and has IP Forwarding enabled to be able to route traffic from eht1 to eth0.
Code:
eth0      Link encap:Ethernet  HWaddr 08:00:27:f1:ef:5f  
          inet addr:10.0.2.1  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fef1:ef5f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1504 (1.4 KiB)  TX bytes:8665 (8.4 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:fd:74:81  
          inet addr:192.168.56.199  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fefd:7481/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:234 errors:0 dropped:0 overruns:0 frame:0
          TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25428 (24.8 KiB)  TX bytes:28130 (27.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)
IP Forwarding is configured as follows :
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/sysctl.conf:
net.ipv4.ip_forward = 1
- Second guest with hostname 'ldap1' has the following config :
Code:
eth0      Link encap:Ethernet  HWaddr 08:00:27:12:1c:9b  
          inet addr:192.168.56.200  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe12:1c9b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:791 errors:0 dropped:0 overruns:0 frame:0
          TX packets:385 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:119480 (116.6 KiB)  TX bytes:43738 (42.7 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:120 errors:0 dropped:0 overruns:0 frame:0
          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17920 (17.5 KiB)  TX bytes:17920 (17.5 KiB)
When I try to ping from 'ldap1' whatever IP or FQDN on the internet, it doesn't work.

What is wrong ?

thx for help
 
Old 02-15-2011, 01:37 PM   #2
samborambo
LQ Newbie
 
Registered: Dec 2004
Location: New Zealand
Distribution: Ubuntu LTS
Posts: 10

Rep: Reputation: 0
You also need a forwarding rule in iptables. There are lots of howtos on ip forwarding. Google it.

Sam.
 
Old 02-16-2011, 04:45 PM   #3
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
thx 'samborambo' i used this link.
Your suggestion was what I was looking for.

thx again.

Last edited by drManhattan; 02-16-2011 at 04:56 PM.
 
  


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
IP forwarding doesn't work when log as user tanveer Linux - Networking 9 12-07-2006 07:06 AM
IP Forwarding won´t work tiuz Slackware 5 04-27-2006 08:20 PM
Port Forwarding does NOT work! The Pentium Guy Linux - Networking 4 10-31-2004 07:40 PM
DNS forwarding: does it actually work? rabbate Linux - Networking 1 06-26-2004 02:58 PM
Port forwarding does not work! philipina Linux - Networking 2 03-03-2004 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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