Hi lovely guys,
Can you point me to how can i create a policy to allow an external IP to SSH to a specific internal server? I have tried the below but server still can't be reached.
I've tried to add the external in Policy & Object>Addresses: Name: External_SSH_Access Type: Subnet IP: xxx.xxx.xxx.xx Interface: Any
And added a policy in Policy & Object>IPv4 Policy
Name: SSH_Access Incoming: Wan1 (My wan port)
Outgoing: Prod Network (network where Server is)
Source: External_SSH_Access
Destination: Server_to_SSH (via VIP that points to WAN IP to LAN IP with port 22)
Schedule: Always
Server: SSH
Action: Accept
NAT:Off
Enable this policy: On
Done all these, but i the person in this External IP can't reach the server.
Any ideas on what am i missing, please. You help is much appreciated.
Solved! Go to Solution.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hello Allferry,
If you want to use the same public for the VIP and the firewall external check if your fortigate is listening on port22. If it is then you have 2 options:
1. Change the FG ssh ports to something else
2. Perform PAT in the VIP saying that if you request port 2222 translated to your server ip port 22. The server will be accessible from the remote ip as your-publicip:2222
Hello,
On the VIP object you can specify a permitted source address by set src-filter command, example:
FortiGate # sh firewall vip FAC_SSH
config firewall vip edit "FAC_SSH" set uuid 4fb2d328-5416-51eb-63ce-2697c2a45f2c set src-filter "192.168.15.49" set extip 192.168.103.10 set mappedip "10.10.10.254" set extintf "any" set portforward enable set extport 2222 set mappedport 22 next end
Hello and welcome to the forums
Try match-vip enable (on the policy in cli)
Best
________________________________________________________
--- NSE 4 ---
________________________________________________________
Hello Allferry,
If you want to use the same public for the VIP and the firewall external check if your fortigate is listening on port22. If it is then you have 2 options:
1. Change the FG ssh ports to something else
2. Perform PAT in the VIP saying that if you request port 2222 translated to your server ip port 22. The server will be accessible from the remote ip as your-publicip:2222
pyy wrote:Yep. Easiest way is to change the SSH port on outside interface to something else.Hello Allferry,
If you want to use the same public for the VIP and the firewall external check if your fortigate is listening on port22. If it is then you have 2 options:
1. Change the FG ssh ports to something else
2. Perform PAT in the VIP saying that if you request port 2222 translated to your server ip port 22. The server will be accessible from the remote ip as your-publicip:2222
Jerry Paul White
Network Engineer/Tech Supervisor
" 01001000 01100001 01110110 01100101 00100000 01100001 00100000 01000111 01101111 01101111 01100100 00100000 01000100 01100001 01111001"
Thanks Guys,
I'll try this last approach.
Many thanks
Allferry
1. Put the rule at the top of the IPv4 Policy
2. Change the source to ALL
If both this two works, you can ensure that your rule is working as expected. However, if it doesnt work when both steps is done, i would suggest checking the port forwarding configuration under "Policy & Objects" > "Virtual IPs". Make sure that an IPv4 Virtual IP and IPv4 Virtual IP Group is created for the connection
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1698 | |
1092 | |
752 | |
446 | |
228 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.