1

I'm configuring a virtual firewall using Shorewall and have a rule to forward the external port 2222 to internal port 22:

DNAT    inet    lan:192.168.1.2:22    tcp    2222

where 192.168.1.2 is the IP address of the firewall. But it doesn't work!

I don't want to allow SSH directly (port 22) like this:

SSH(ACCEPT)    inet    $FW

How do I make the firewall accept redirected SSH?

3
  • Please tag also by shorewall. AU is missing this tag. Dec 15, 2013 at 21:05
  • you can add another line: 'Port 2222' in /etc/ssh/sshd_config and ssh will listen to that port as well
    – jet
    Dec 16, 2013 at 1:50
  • @jet: thanks! makes sense. and works, too. please post as an answer Dec 16, 2013 at 18:49

1 Answer 1

1

you can add another line: 'Port 2222' in /etc/ssh/sshd_config and ssh will listen to that port as well

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .