Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25th June 2005, 05:55 AM
cyanid3 Offline
Registered User
 
Join Date: Sep 2004
Posts: 43
Iptables Packet forwarding/routing problem

I'm trying to get iptables to forward packets from one interface to another.
I'm trying this:
Code:
iptables -P FORWARD DROP
iptables -A FORWARD -i eth1 -o eth2 -j ACCEPT
iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT
What am I doing wrong?
Reply With Quote
  #2  
Old 27th June 2005, 10:45 AM
fire-fly Offline
Registered User
 
Join Date: Aug 2004
Posts: 269
what is the setting of /proc/sys/net/ipv4/ip_forward
must be 1.
Reply With Quote
  #3  
Old 28th June 2005, 03:00 AM
cyanid3 Offline
Registered User
 
Join Date: Sep 2004
Posts: 43
Hrm, it's already set at 1. Could it be anything else?
Reply With Quote
  #4  
Old 29th June 2005, 10:00 AM
ghenry's Avatar
ghenry Offline
Retired Community Manager
 
Join Date: Mar 2004
Location: Scotland
Age: 35
Posts: 1,019
What about the input chain?
__________________
http://blog.suretecsystems.com
Reply With Quote
  #5  
Old 29th June 2005, 03:31 PM
cyanid3 Offline
Registered User
 
Join Date: Sep 2004
Posts: 43
The policy for input is accept
Reply With Quote
  #6  
Old 2nd July 2005, 04:05 AM
vladimir Offline
Registered User
 
Join Date: Aug 2004
Location: Lithuania
Age: 30
Posts: 10
in /etc/sysconfig/network file make sure there is a line which says
FORWARD_IPV4 = yes
Reply With Quote
  #7  
Old 20th July 2005, 04:34 AM
cyanid3 Offline
Registered User
 
Join Date: Sep 2004
Posts: 43
Quote:
Originally Posted by vladimir
in /etc/sysconfig/network file make sure there is a line which says
FORWARD_IPV4 = yes
I get errors when restarting the interfaces when I add this in. Could this be the problem?

Also, my input chain is set to accept all.
Reply With Quote
  #8  
Old 20th July 2005, 02:55 PM
nikita99 Offline
Registered User
 
Join Date: Jul 2005
Posts: 6
Quote:
Originally Posted by cyanid3
I'm trying to get iptables to forward packets from one interface to another.
I'm trying this:
Code:
iptables -P FORWARD DROP
iptables -A FORWARD -i eth1 -o eth2 -j ACCEPT
iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT
What am I doing wrong?
what are your failure records? how can you see it doesn't work?
do you use tcpdump on the interfaces?
Reply With Quote
  #9  
Old 4th September 2005, 06:16 PM
cyanid3 Offline
Registered User
 
Join Date: Sep 2004
Posts: 43
Okay, after a little bit of frustration I reinstalled the operating system, and decided to give it another shot. I did everything above and it still isnt forwarding packets.

the forwarding computer has ip's 192.168.0.102, and 192.168.3.1.
I want to be able to ping google.com from 192.168.3.102, but when I try i get, "Ping request could not find host google.com. Please check the name and try again."
The gateway on the client computer is set to 192.168.3.1.
The routing table on the forwarding computer is: "
[root@gatekeeper ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth2"


This is really ticking me off. Is there anything else that I could try/check?
Reply With Quote
  #10  
Old 10th September 2005, 03:21 AM
jp110 Offline
Registered User
 
Join Date: Sep 2005
Posts: 22
For starters, what is on eth0?
and where is 169.254 from?
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth2"
Reply With Quote
Reply

Tags
forwarding or routing, iptables, packet, problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IP packet forwarding arrowheart Servers & Networking 1 6th November 2007 11:59 PM
Packet Forwarding from eth0 to eth1 isn't working rajat123 Servers & Networking 0 7th May 2007 09:58 AM
Turn on packet forwarding at boot time ascheucher Servers & Networking 2 25th July 2005 06:35 PM


Current GMT-time: 11:59 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat