Skip to content

Commit

Permalink
add ssh port on firewall
Browse files Browse the repository at this point in the history
  • Loading branch information
magnussolution committed Aug 7, 2023
1 parent 3f4e1be commit 5ee38b7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/helper/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ Ext.define('Helper.Util', {
return value;
},
formatDirection: function(value) {
value = value == 1 ? t('Outbound') : t('Inbound');
value = value == 1 ? t('Outbound') : value == 2 ? t('Inbound') : t('Outbound & CallerID');
return value;
},
formatHangupCause: function(value) {
Expand Down
Binary file modified build/MagnusBilling-current.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion classic/src/view/restrictedPhonenumber/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Ext.define('MBilling.view.restrictedPhonenumber.Form', {
forceSelection: true,
editable: false,
value: '1',
store: window.bbx ? [
store: window.dialC ? [
[1, t('Outbound')],
[2, t('Inbound')],
[3, t('Outbound & CallerID')]
Expand Down
3 changes: 2 additions & 1 deletion classic/src/view/restrictedPhonenumber/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Ext.define('MBilling.view.restrictedPhonenumber.List', {
type: 'list',
options: [
[1, t('Outbound')],
[2, t('Inbound')]
[2, t('Inbound')],
[3, t('Outbound & CallerID')]
]
},
flex: 1
Expand Down
2 changes: 2 additions & 0 deletions protected/components/ApiAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ private function checkPermissions($modelApi)
$action = 'd';
} else if ($_POST['action'] == 'buy') {
$action = 'r';
} else if ($_POST['action'] == 'liberar') {
$action = 'u';
} else if ($_POST['action'] == 'getNewUsername') {
$action = 'r';
} else if ($_POST['action'] == 'getNewPassword') {
Expand Down
3 changes: 2 additions & 1 deletion script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -866,16 +866,17 @@ echo
echo "Installing Fail2ban & Iptables"
echo

ssh_port=$(cat /etc/ssh/sshd_config | grep Port | awk 'NR==1{print $2}')

install_fail2ban


iptables -F
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport $ssh_port -j ACCEPT
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
Expand Down

0 comments on commit 5ee38b7

Please sign in to comment.