Results 1 to 3 of 3

Thread: How to edit Rc.Local the correct way

  1. #1

    How to edit Rc.Local the correct way

    I wanted to add a few function to my RC.Local file so it will auto port forward
    my port 49355 (for enhanced-bittorrent) But i have to login and add
    iptables -I INPUT 7 -p tcp --dport 49355 -j ACCEPT manually every time.
    I just waned a correct way to add it into rc.local so i can have that port open every time the router is rebooted ? by the way i am running 1.0.7.8 custom kfrug firmware. Thank you

  2. #2
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244

    Smile joe or nano

    Quote Originally Posted by Fullback View Post
    I wanted to add a few function to my RC.Local file so it will auto port forward
    my port 49355 (for enhanced-bittorrent) But i have to login and add
    iptables -I INPUT 7 -p tcp --dport 49355 -j ACCEPT manually every time.
    I just waned a correct way to add it into rc.local so i can have that port open every time the router is rebooted ? by the way i am running 1.0.7.8 custom kfrug firmware. Thank you
    Hi Fullback,

    If you read /opt/etc/rc.local (with cat) you should see that KFurge has added a section:
    # Poke holes in the firewall for certain applications
    with
    /opt/etc/init.kc/iptables_mldonkey.sh

    So, I think it would be wise to edit that one in stead of rc.local. But, if you want to stay on the safe side, you'd better edit rc.local, because you can easily recover from a problem with it.

    Now, for the edit part, if you have searched this forum you will have come across nano or joe. Use one of these. (ipkg install nano, etc)

    Regards,
    Marc

  3. #3

    thanks

    Hey, thanks i like using vi its cool. I also installed nano very neat as well. But i got it to always open the ports as i requested. Just added

    #Opening ports for Enhanced-Ctorrent
    iptables -I INPUT 7 -p tcp --dport 49355:49355 -j ACCEPT

    to rc.local file.

Similar Threads

  1. Problems with hdd spindown og rc.local
    By ashansen in forum WL-700g Q&A
    Replies: 27
    Last Post: 29-01-2009, 22:01
  2. ML-Donkey does not startup from rc.local
    By emailpr in forum WL-700g Q&A
    Replies: 2
    Last Post: 11-12-2007, 00:54
  3. how do I edit rc.local
    By emailpr in forum WL-700g Q&A
    Replies: 0
    Last Post: 07-12-2007, 08:35
  4. Recover from bad rc.local
    By Gizmo1007 in forum WL-700g Firmware Discussion
    Replies: 2
    Last Post: 18-10-2007, 23:16
  5. rc.local issue
    By peterke in forum WL-700g Firmware Discussion
    Replies: 1
    Last Post: 15-03-2007, 14:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •