LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 02-03-2004, 04:45 PM   #1
thetick
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Help with SuSe 9 and routing


I am a complete newbie to linux and SuSe.

I have successfully (sp) installed SuSe on a xp machine (grub2 dual boots fine)

The only problem I have 3 nic's and 2 of them connect to Playstation 2's I managed to get my main nic configured (dhcp)

But I have no clue on how to setup the remaining nic's to allow traffic.

Any pointers ???






 
Old 02-04-2004, 04:02 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
What are you trying to do? Do you just want to allow the 2 playstations to communicate or are you trying to allow them out onto the internet and/or allow incoming traffic from the 'net to the playstations? Eitherway you'll need to do some packet forwarding and possibly IP masquerading as well.
 
Old 02-08-2004, 01:45 PM   #3
thetick
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
yup trying to allow the acsess to the internet.

I assumed that it would be a case of static ip for the ps2 nic's and then ip forwarding but alas no and thats where my know how ends.

Are there any idiots guides for this kinda thing ?
 
Old 02-08-2004, 07:00 PM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
From your first post, it looks like your firewall box gets a dynamic IP through dhcp. So what you want to setup is called IP Masquerading. It's actually really easy to setup. All you basically have to do is add a couple of iptables rules.


***for all of the above rules, replace <external_interface>, <internal_interface1> and <internal_interface2> with the name of the corresponding interface (like eth0, eth1, ppp0, etc)***

As root do:
iptables -t nat -A PREROUTING -o <external_interface> -j MASQUERADE

That takes care of the NAT (Network Address Translation), now you need to allow packet forwarding to pass packets from the LAN interface to the external interface for each of the 2 playstations.

iptables -A FORWARD -i <internal_interface1> -o <external_interface> -j ACCEPT
iptables -A FORWARD -i <internal_interface2> -o <external_interface> -j ACCEPT

Then allow only stuff you want to be forwaded into the LAN for each of the 2 playstations:

iptables -A FORWARD -i <external_interface> -o <internal_interface1> -m --state RELATED,ESTABLSHED -j ACCEPT
iptables -A FORWARD -i <external_interface> -o <internal_interface2> -m --state RELATED,ESTABLSHED -j ACCEPT

Finally do: echo "1" > /proc/sys/net/ipv4/ip_forward
and /usr/sbin/iptables-save

Now if you want people to be able to initiate connections into your LAN, then that's a little different. But the above rules will allow the playstatiions out on the 'net. If you have any questions about those rules or are confused about anything, just let me know. There are plenty of HOWTOs and guides to look at as well:

http://www.tldp.org/HOWTO/Masqueradi...WTO/index.html
http://www.netfilter.org/documentati.../NAT-HOWTO.txt
http://iptables-tutorial.frozentux.n...-tutorial.html

If that all sounds like too much, you can probably use YaST to do it as well. Start > Control Center> YaST Modules> Security and Users> Firewall. That will give you a graphical "wizard" that will walk you through setting up the firewall. The important thing is to select "Forward Traffic and Do Masquerading". That should work, but I'm not sure if it can handle 3 NICs.
 
Old 12-12-2005, 03:47 AM   #5
Unbreakable_MJ
LQ Newbie
 
Registered: Nov 2005
Location: Bahrian
Distribution: Debian (stable), Arch
Posts: 12

Rep: Reputation: 0
Unhappy Problem with iptables

Quote:
Originally Posted by Capt_Caveman
iptables -A FORWARD -i <external_interface> -o <internal_interface1> -m --state RELATED,ESTABLSHED -j ACCEPT
iptables -A FORWARD -i <external_interface> -o <internal_interface2> -m --state RELATED,ESTABLSHED -j ACCEPT
The error message:
Code:
# iptables -A FORWARD -i ppp0 -o eth0 -m --state RELATED,ESTABLSHED -j ACCEPT
iptables v1.3.3: Couldn't load match `--state':/usr/lib/iptables/libipt_--state.so: cannot open shared object file: No such file or directory

Try `iptables -h' or 'iptables --help' for more information.
 
  


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
permanent routing with SuSE lpoorman Linux - Networking 1 12-02-2005 08:35 PM
SuSe 7.0 routing to two different VPN-s szszekel Linux - Networking 0 03-25-2005 11:57 AM
Suse 9.1- Routing to Windows cjmcg Linux - Networking 2 09-05-2004 05:36 PM
SuSE vpn routing problem - need help nag029 Linux - Networking 1 07-26-2004 10:51 AM
Routing with SuSe 8.2 SinisterX Linux - Networking 0 09-03-2003 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 10:25 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
Open Source Consulting | Domain Registration