iptables blocking local traffic

n3o

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):

Sylla

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related