Port Forwarding per Komandozeile

Post new topic   Reply to topic    DD-WRT Forum Index -> Allgemeine Fragen
Author Message
gerhof
DD-WRT Novice


Joined: 17 Feb 2010
Posts: 4

PostPosted: Wed Feb 17, 2010 0:29    Post subject: Port Forwarding per Komandozeile Reply with quote
Hallo dd-wrt fans,
ich habe auf meinem Netgear WGR614v8/L/WW folgendes
DD-WRT v24-sp2 (03/27/09) mini
(SVN revision 11793M NEWD Eko)
installiert, konfiguriert und soweit tut auch alles.

Nun würde ich gerne per ssh/cli eine einzelne Port Forwarding Regel (die auch in der webgui konfiguriert ist) enablen bzw disabled und wenn möglich das ganze ohne reboot - das scheint ja über die webgui zu gehen ... hab aber leider nicht den richtigen CLI Befehl bisher gefunden - danke für sachdienliche Hinweise Wink
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Wed Feb 17, 2010 1:34    Post subject: Reply with quote
lies das iptables manual
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
gerhof
DD-WRT Novice


Joined: 17 Feb 2010
Posts: 4

PostPosted: Wed Feb 17, 2010 1:58    Post subject: Reply with quote
Sash wrote:
lies das iptables manual

hab ich natürlich schon z.B. http://www.dd-wrt.com/wiki/index.php/One-to-one_NAT#Copy.2FPaste_Examples

aber bisher hat das bei mir nur funktioniert wenn ich das dann noch mit nvram commit und reboot abgeschickt habe...
gibt es denn keine Möglichkeit de redirects ohne reboot zu aktivieren?
gerhof
DD-WRT Novice


Joined: 17 Feb 2010
Posts: 4

PostPosted: Wed Feb 17, 2010 2:11    Post subject: Reply with quote
vielleicht noch etwas genauer ... das setzen geht schon ... nur wie bekomme ich genau diese Einträge wieder raus?
gerhof
DD-WRT Novice


Joined: 17 Feb 2010
Posts: 4

PostPosted: Wed Feb 17, 2010 2:21    Post subject: Reply with quote
ok ... ich zieh alles zurück
iptables -t nat -I PREROUTING -d `nvram get wan_ipaddr` -j DNAT --to [mylocalIP]
iptables -t nat -I POSTROUTING -s [mylocalIP]
-j SNAT --to `nvram get wan_ipaddr`
iptables -I FORWARD -d [mylocalIP]
-p tcp --dport 443 -j ACCEPT

und zum abschalten
iptables -I FORWARD -d [mylocalIP]
-p tcp --dport 443 -j REJECT

hat geholfen ... nur beim Reboot reicht es nicht nur einen ACCEPT zu machen sondern dann müssen alle 3 Befehle ausgeführt werden ...

stellt sich mir nur die Frage ob das so Sinn macht ...
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Allgemeine Fragen All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum