iptables rerouting

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
dneteng
DD-WRT Novice


Joined: 30 May 2019
Posts: 5

PostPosted: Wed Aug 28, 2019 19:50    Post subject: iptables rerouting Reply with quote
I am trying at the command line to reroute as follows.

iptables -A PREROUTING -d 63.168.228.8 -p tcp -m tcp -j DNAT --to-destination 63.168.229.100

if I then do a list

iptables -t nat -L

I dont see the rule and it is not being applied
Sponsor
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1414

PostPosted: Wed Aug 28, 2019 21:52    Post subject: Reply with quote
wrong table command should be:

Code:

iptables -t nat -A PREROUTING -d 63.168.228.8 -p tcp -m tcp -j DNAT --to-destination 63.168.229.100


-t nat is added. On your initial command since you did not specify a table it defaulted to filter.

Apparently DD-WRT's implementation does not echo out an error on your command
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14217
Location: Texas, USA

PostPosted: Thu Aug 29, 2019 1:58    Post subject: Reply with quote
And you'll also have to delete the wrong entry in the process of fixing it.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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