LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-03-2002, 09:32 PM   #1
dude_228
Member
 
Registered: Dec 2002
Posts: 37

Rep: Reputation: 15
please help


hey
ive got the MANDRAKE 9.0
my routing works fine


next
ive edited the shorewall rules
and DNAT net loc:192.168.1.2 tcp 5000,5001,5002,5003,5004,5005,5006,5007,5008,5009,5010
this is ment 2 forward these ports
ok
allirhgt
it seems 2 be wroking
i restart shorewall
shorewall restart
still not forwarding
i restaert my whole box
the routing is now disabled
now

i check drakconf
a reanble routng
it wont work
i reconfigure it
routing is again working
but the line ive added to shoreall rules goes away

some told me 2 do like console

iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 5000 -j DNAT --to 192.168.1.2:5010

this is finally forwarding my ports
!!!!

but every tiem i reboot my \linux box
this line goes away
and i seemk 2 have 2 retype in
what r some commands 2 add it to the startup script

also please tell me f there is a better way 2 forward ports
cuz i'm ,lost
did mandrake modify the shorewall
so it wont forward ports

please help me thnx alot!!!!
 
Old 12-03-2002, 11:31 PM   #2
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
you need to put those "iptables" commands in a bash script and call it from your rc.local so that its executed every time at boot.

Something like this in a file called rc.firewall....
------------------------------------------
#!/bin/sh
insmod ip_tables

echo " Enabling IPFORWARDING ... "
echo "1" > /proc/sys/net/ipv4/ip_forward

#Add your commands below here

-------------------------------------
Put all that in a file called rc.firewall, chmod 744 on it, put it in /etc/rc.d/ then add this line to the end of /etc/rc.d/rc.local/

sh /etc/rc.d/rc.firewall


-KevinJ
 
Old 12-04-2002, 02:34 PM   #3
dude_228
Member
 
Registered: Dec 2002
Posts: 37

Original Poster
Rep: Reputation: 15
whats thge best way 2 forward ports in mandrake linux
 
Old 12-04-2002, 02:52 PM   #4
dude_228
Member
 
Registered: Dec 2002
Posts: 37

Original Poster
Rep: Reputation: 15
hey

hey
ive looked
i can only find
/etc/rc.d/

but there is no rc.firewall isn there
i am logged in as root
thn x
 
Old 12-04-2002, 04:28 PM   #5
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
No.. you have to make an rc.firewall

-Kevin
 
Old 12-04-2002, 07:10 PM   #6
dude_228
Member
 
Registered: Dec 2002
Posts: 37

Original Poster
Rep: Reputation: 15
guess what
the forwarding wont work anymore
from when ive rebooted the box
 
Old 12-04-2002, 07:52 PM   #7
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
what does your rc.firewall and rc.local files look like?

what are the permissions on rc.firewall?

-KevinJ
 
  


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



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

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