Menu

Routing-Einträge via IPTABLES - wie?!

Help
2009-09-22
2013-05-29
  • Christian Keck

    Christian Keck - 2009-09-22

    Hi,

    ich würde gerne den Router dazu überreden, dass er das Subnetz 192.168.0.0/24 via der IP 192.168.1.1 routet.
    Ich weiss, dass das irgendwie mit IPTABLES möglich ist, kenne mich mit der Syntax aber nicht wirklich aus.
    Wie kann ich das realisieren und wie mache ich diesen Eintrag permanent, so dass er direkt nach dem Reboot des Routers wieder vorhanden ist?
    Danke schon mal!

    Gruß,
    Chris

     
  • Christian Keck

    Christian Keck - 2009-10-01

    Okay, solved this issue myself meanwhile.
    I tried "route add" already unsuccessfully, but in fact it works. Here's the trick how, maybe it helps others too with similar problems:

    The bulitin "route add" command in this BusyBox-version needs a specification of WHAT the route describes, either a "-host" or a whole "-net".
    If one ommits this information, the command fails. So the correct syntax for my problem is like this:

    route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.1.1

    I added this line in the section "Administration->Custom script" and it works great.

    cheers,
    Chris

     

Log in to post a comment.

MongoDB Logo MongoDB