This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Port fwd to different dport... can it be done?

ASL 4.008, two nics, Internet access through PPPoE.

I'd like to access port 22/tcp on my internal server from the internet.
Thus I setup a DNAT rule like this:
 Code:
All -> FWA_Interface__ / Ext_SSH23022	 	None	 	Server.lan / SSH


Then I allow access to port 23022 on FWA_Interface__ and the access to port 22 on Server.lan. The first rule shouldn't be necessary, though.
The packets that hits Server.lan are destined for :23022, which they shouldn't. 
I could just make ssh listen on port 23022 as well, but it bothers me that I've either got it all wrong or that it doesn't work as it should.

Have I got it right?
How do I make it work? 

-- 
Steen Suder  


This thread was automatically locked due to age.
  • The simple way is to turn off ssh on the external nic. Then you just dnat port 22 in to the internal server. Otherwise, what you have done should work. Just check your packet filter live log to see if packets are being blocked. Then you can add filter rules to allow the action. 
  • [ QUOTE ]
    The simple way is to turn off ssh on the external nic. Then you just dnat port 22 in to the internal server. Otherwise, what you have done should work. Just check your packet filter live log to see if packets are being blocked. Then you can add filter rules to allow the action.  

    [/ QUOTE ]

    The funny part is that it works if I DNAT port 24022 to port 22 on another box on the same LAN (192.168.1.4 as opposed to 192.168.1.3).
    Now I wonder if there is some setting on the targets like accept_redirects or another in that direction that will prohibit connection and/or DNAT. 

    -- 
    Steen Suder  
  • UPDATE:

    If I create the DNAT-rule for SSH on port 23022 to target port 22 with a name like "AAA-SSH-fwd" that gets placed above the two DNAT-rules that handles my PASV-ftp-service on the same server, the port 23022-SSH works as expected.
    The ftp seems to work also.

    What is it that I don't understand here? [:S]

    -- 
    Steen Suder     
  • Yes, this is possible.  I am redirecting standard telnet and smtp ports to alternate dports on a server in my DMZ.