LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-13-2004, 08:36 PM   #1
Ben Novack
Member
 
Registered: Jan 2004
Distribution: Mandrake 9.2
Posts: 33

Rep: Reputation: 15
Trying to get Suse 9.0 to be a router


Suse 9.0.

eth0 is where ppp0 goes; that's a PPPoE connection that gets to the internet.
eth1 is connected to my laptop; the idea is to get the laptop online as well.

The firewall is set to have ip forwarding and masquerading turned on, and protection against internal attacks off; ppp0 is the external interface, and eth1 is the internal interface.

What am I missing?
 
Old 01-13-2004, 09:12 PM   #2
zer0python
Member
 
Registered: Sep 2003
Posts: 104

Rep: Reputation: 20
Sounds like your missing an iptables rule, I don't know if this will help but here is the script I used when I was on dialup (which used ppp0) so I could get only from my other boxes all at the same time (not sure if my isp liked that ;-))

Code:
#!/bin/sh

ipt=/usr/sbin/iptables
ipf="/proc/sys/net/ipv4/ip_forward"
ipd="/proc/sys/net/ipv4/ip_dynaddr"

$ipt -F
$ipt -P INPUT DROP
$ipt -P FORWARD ACCEPT
$ipt -P OUTPUT ACCEPT

$ipt -A INPUT -p ALL -i lo -j ACCEPT
$ipt -A INPUT -p ALL -i eth0 -j ACCEPT

$ipt -A INPUT -p tcp -i ppp0 --dport 80 -j ACCEPT

$ipt -A INPUT -p tcp -i ppp0 --sport 80 -j ACCEPT
$ipt -A INPUT -p udp -i ppp0 --sport 53 -j ACCEPT
$ipt -A INPUT -p tcp -i ppp0 --sport 22 -j ACCEPT


$ipt -A OUTPUT -o ppp0 -p icmp --icmp-type echo-request -j ACCEPT
$ipt -A INPUT -i ppp0 -p icmp --icmp-type echo-reply -j ACCEPT
$ipt -A OUTPUT -o ppp0 -p icmp --icmp-type echo-reply -j DROP
$ipt -A INPUT -i ppp0 -p icmp --icmp-type echo-request -j DROP

$ipt -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
$ipt -A FORWARD -i ppp0 -m state --state NEW,INVALID -j DROP
echo 1 > $ipf; echo 1 > $ipd;
That was on a slackware 9.0 box, and it was in /etc/rc.d/rc.firewall.. I'm sure it's different for SuSE (well duh!) anyway, hope this helps!
 
  


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
SUSE 10.0 Router XaViaR SUSE / openSUSE 1 12-02-2005 09:07 AM
Suse as a router???? dasbooter SUSE / openSUSE 9 08-19-2005 03:15 PM
suse 9.0 with router wolf6873 Linux - Wireless Networking 1 07-19-2005 07:29 PM
Suse 9.1 as a router? NOTORIOUS VR SUSE / openSUSE 1 01-18-2005 07:14 PM
SuSE 8.0 as router Fabian030 Linux - Networking 1 09-13-2003 09:29 AM

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

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