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!!!! |
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 |
whats thge best way 2 forward ports in mandrake linux
|
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 |
No.. you have to make an rc.firewall
-Kevin |
guess what
the forwarding wont work anymore from when ive rebooted the box |
what does your rc.firewall and rc.local files look like?
what are the permissions on rc.firewall? -KevinJ |
All times are GMT -5. The time now is 12:31 PM. |