How to configure a redirect rule on the loopback interface

Post Reply
shuangg
Junior Member
Posts: 2
Joined: 10 Nov 2014, 13:38

How to configure a redirect rule on the loopback interface

Post by shuangg »

I need a rules to direct port 80 to port 8080 on the loopback interface, but the rule CSF generated excludes loopback (!lo). Is there a way I can have
iptables -t nat -I OUTPUT -p tcp -o lo --dport 80 -j REDIRECT --to-ports 8080
shuangg
Junior Member
Posts: 2
Joined: 10 Nov 2014, 13:38

Re: How to configure a redirect rule on the loopback interfa

Post by shuangg »

Found one solution - create / etc / csf/ csfpost. sh and add the command into it.
Post Reply