Ask Your Question
1

iptables -L PREROUTING not showing up

asked 2018-09-08 06:21:22 -0600

GobbleFly gravatar image

Hello, I have struggled with this problem for a few days now and I can't go further if I don't fix it .-

So when I do iptables -L PREROUTING it then shows this error iptables: No chain/target/match by that name.

but if i iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080 it doesn't show up with iptables --list but only with iptables -L -t nat.

So the big problem is when i do sslsplit (to receive the traffic) it doesn't work.

All the other chains do work except the POSTROUTING doesn't work to.

edit retag flag offensive close merge delete

Comments

2

You may want to rerphrase your question as it is very confusing and explain what you actually want to achieve. This sounds like a XY problem. You are talking about PREROUTING, but your last statement is about POSTROUTING. Also, there is no PREROUTING in the filter table which is the default when iptables is called without the -t option and a valid table.

thomaswood gravatar imagethomaswood ( 2018-09-08 12:24:38 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2018-09-11 13:52:59 -0600

GobbleFly gravatar image

The specification is not the problem because when i tried it the first time it worked well. But the second time i might have done something wrong. Is it possible that this is because i iptables -F ? Yes it is confusing, i am unable to understand it myself either. Sorry for my grammatical mistakes(I am not english).

edit flag offensive delete link more
0

answered 2018-09-09 16:32:21 -0600

fedofix gravatar image

updated 2018-09-10 16:48:31 -0600

Hello GobbleFly

Start by the beguinning ...

So you want to make NAT on your NIC ? Coud you describe what you want to do with option "REDIRECT --to-ports 8080"

edit flag offensive delete link more

Comments

I would like to do a sslstrip and redirect all the traffic to port 8080(localhost machine)

GobbleFly gravatar imageGobbleFly ( 2018-10-01 03:44:50 -0600 )edit
0

answered 2018-09-09 21:35:11 -0600

Pant gravatar image

Prerouting lives in the NAT table. You have to specify the table to look for with -t nat.

Full command: # iptables -t nat -L PREROUTING

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-09-08 06:21:22 -0600

Seen: 59 times

Last updated: Sep 11