TIPS Linux firewall Rules in Webmin

jolebole

Member
Joined
Feb 7, 2016
Messages
37
Reaction score
5
Hello again,

I just compared the "Lean" and "Enchilada" FreePBX instances in Webmin and it looks like the IP addresses for all the SIP Trunk providers are missing in the Enchilada version. The trunks do show in FreePBX but no IP addresses in Linux Firewall rules in Webmin. They rules are identical as in the "Lean" version.

Thanks,
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Do Not Play in Webmin - the Firewall files are 'scattered' in the new ways.

Use either SSH or even a program like WinSCP and look in /usr/local/sbin -- this is where you will find a file called iptables-custom - this has the Provide4r IPs and even your allowed IPs (read where the system grabbed the IP of your home computer) is at and any IPs or FQDN entries added with /root/add-ip (name) (ip) or /root/add-fqdn (name) (fqdn.tld)

These files are OUTSIDE of the 'main' iptables file that webmin looks for.
 

jolebole

Member
Joined
Feb 7, 2016
Messages
37
Reaction score
5
Got it. Adding a IP is pretty easy with /root/ip-add command...But can I add a subnet with the same command or no ?
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
ostridge, the iptalbes are in /usr/local/sbin/iptables_custom in newer (Enchilada on CentOS6.9 - at lest on mine anyways)

dhoppy -- OP didn't ask for Ranges -- he asked for subnets -- ip.of.bo.xx su.bn/ne.tX --e.g. 194.23.85.123 255.255.255.0 -- OP wants to whitelist the 255.255.255.0 part -- to that I do not think so, but I am not the expert on this part. Now if I read this wrong - I apologize, but subnet is not the same as an IP range.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
@mainenotarynet - @dhoppy's link is on point. The thread title is for "ranges" but all content discusses subnets.

@ostridge - as @dhoppy's linked thread suggests, you should be fine using CIDR notation with the current commands. The ip validation is liberal enough to allow CIDR. Only caveat is if @wardmundy does not fully sanction such use a future update could possibly break CIDRs.
 

dhoppy

Active Member
Joined
Mar 9, 2009
Messages
445
Reaction score
181
Forgive me for playing fast and loose with my "subnets" and my "ranges." (I thought a subnet was a range of IPs, that could be expressed in CIDR notation). Oh, and I don't really care about the difference.
 
Last edited:

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,634
Reaction score
846
All 'subnets' are 'ranges' not all 'ranges' are 'subnets'.

https://en.wikipedia.org/wiki/Subnetwork

if a range is sequential , it is by definition either a 'subnet' or a set of 'subnets'. subnets can range from /32 (a host) to /0 which would need to be a power of 2 of the initial ip.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
Rules are no longer stored exclusively in rules.v4 or /etc/sysconfig/iptables because you cannot safely restart IPtables with FQDNs embedded there. To see current rules, use:

iptables -nL
 

Members online

Forum statistics

Threads
25,821
Messages
167,814
Members
19,247
Latest member
mdauck
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top