What's new

I need advice for firewall rule?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bayern1975

Very Senior Member
hello, i am trying to create firewall rule but can`t get to work. my router lan IP address is 192.168.15.1, IPTV is set on PC with IP 192.168.15.100. so this rule is working if IPTV set on router and not working when is IPTV set on PC....
Code:
iptables -I INPUT -p tcp -s 213.229.192.0/18 --dport 81 -j DROP
how to make a working rule for my case?
 
Rules intended for a device on your LAN must go in the FORWARD chain. The INPUT chain is only for traffic aimed at the router itself.
 
Rules intended for a device on your LAN must go in the FORWARD chain. The INPUT chain is only for traffic aimed at the router itself.
do you have an example of rule or someone else?

sent from Kodi 17 Krypton
 
is this working rule?
Code:
iptables -t nat -I VSERVER 3 -p tcp -m tcp -s
213.229.192.0/18 --dport 81 -j DNAT --to 192.168.15.1
 
What are you trying to do exactly? Your first rule was about dropping traffic, and now you posted a rule that's about NATing. That's two totally different things.
 
What are you trying to do exactly? Your first rule was about dropping traffic, and now you posted a rule that's about NATing. That's two totally different things.
I know, second rule found on internet and ask here if is good or no....so i need rule to drop some IP from outside to my IPTV on PC....PC have 192.168.15.100 and router have 192.168.15.1....

sent from Kodi 17 Krypton
 
I think you may be better served by first stepping back and describing what problem you are trying to solve without assuming the form of the solution.

I have IPTV service and I need to......

without using any ip addresses or potential iptables rules.
 
I think you may be better served by first stepping back and describing what problem you are trying to solve without assuming the form of the solution.

I have IPTV service and I need to......

without using any ip addresses or potential iptables rules.

i have IPTV set on PC but now all IP from outside my network may access to it but i would like to access just three different IP from outside....all others have to drop or reject....IPTV runing on PC with LAN 192.168.15.100, routers LAN is 192.168.15.1......so i have no idea what rule should be used....
 
I'm surprised that it's accessible from outside of your LAN by default. Are you sure that the router firewall is enabled?
 
Then your PC should not be accessible from the internet unless you have some sort of port forwarding happening.
i have PC lan address insert in DMZ....so all network have access to my IPTV but i need just three address to access my PC lan address....
 
If you use DMZ to your PC then firewalls rule never works. Must is to have firewall turned on (no DMZ) to get it to work.

DMZ = Initialize all the chains by removing all the rules tied to them
 
Last edited:
If you use DMZ to your PC then firewalls rule never works. Must is to have firewall turned on (no DMZ) to get it to work.

DMZ = Initialize all the chains by removing all the rules tied to them
if i remove my IP for PC from DMZ, is there any other method to create firewall rule for my case?
 
If you remove DMZ from your PC you don't need any block rule firewall take care of it then.
 
This would block 213.229.192.0/18 (213.229.192.1 to 213.229.255.254) with DMZ off!!!
Code:
iptables -I FORWARD -s 213.229.192.0/18 -j REJECT
 
Last edited:
i tested all this yours suggestions but not working.....problem is probably different LAN addresses, router IP is 192.168.15.1 and PC IP (IPTV) 192.168.15.100....i have no idea....
 
This would block 213.229.192.0/18 (213.229.192.1 to 213.229.255.254) with DMZ off!!!
Code:
iptables -I FORWARD -s 213.229.192.0/18 -j REJECT
I think you meant to say "firewall off"?

(But turning the firewall off is a really bad idea.)
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top