5652 questions

6863 answers

11066 comments

6945 members

0 votes
216 views 0 comments
by
I need to have 10 source ip addresses to one internal host , what the best way to do that ?

port fw or traffice rules ?

Need some help

Thanks

2 Answers

0 votes
by


Hi, firewall configurations will be done with many different layout, I suggest before asking a very general question like this, to learn about OpenWRT documentation start page

and it's Firewall subsection documentation

All info on this site is very extensive and if you read some little you can get the basic's to handle RUTos networking features.

Regards

0 votes
by

Hi,

It depends on your device.

  • For RUT2, RUT8, RUT9 source NAT can be configured in the Network → Firewall → Traffic Rules page.
  • For TRB1, TRB2, RUTX source NAT can be configured in the Network → Firewall → NAT Rules page.

However, if you need the rule to apply to 10 IPs, you'll have to add 10 separate rules. To do it in one rule, you can use iptables. iptables rules can be added from the Network → Firewall → Custom Rules page. For example:

iptables -t nat -A POSTROUTING -s 192.168.1.5,192.168.1.15,192.168.1.25 -j SNAT --to-source 192.168.1.1

Replace the highlighted IPs with the IPs that you need. When adding more IPs simply separate them with commas (,).

DM