1

My local machine IP: 192.168.0.35

What I did: Answer that i tried here!!

sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 192.168.0.35:80

The error:

Now I can not access any more IP's from my local machine and I do not know why it happened.

Any IP that is: 123.123.123.123, etc ... The result of any attempt is the default page "Apache2 Debian Default Page". Now I can't access my router page to make changes in port forwarding. I don't know how undo this iptables command.


What i want:

I was looking for a way to: Expose my Webserver, from the router on the Internet over port 80 and 443. Deploy httpd(apache2) on port 1337 and continue dev on 8000,8080. From my router to my Raspbian, I'm trying to:

INTERNET IPx:80,443<===>80,443 router <===> IP-local-web-httpd (raspbian):

1 Answer 1

0

Be careful using iptables command.

To have access again you have to delete the iptables command you performed.

So do with -D option and not -A to undo the command.

sudo iptables -t nat -D OUTPUT -p tcp --dport 80 -j DNAT --to-destination 192.168.0.35:80

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .