Re: *** IPF Help Req ***

From: Philip Paeps (philip+usenet_at_paeps.cx)
Date: 11/29/03


Date: Sat, 29 Nov 2003 18:23:50 GMT

NoNameHere <recpharm@hotmail.com> wrote:
> I have 5 internal machines, each running SSH on port 22. I would like
> to be able to SSH to every internal box.
>
> Can I make the firewall accept an SSH connection on a high port (1022,
> 1023, 1024, 1025, 1026) and redirect it to port 22 on the appropriate
> internal machine?

Sure.

> Here is my ipf.rule for each machine:
> pass in quick on xl0 proto tcp from any to 192.168.1.10 port = 1022
> flags S keep state keep frags

This will allow connections to port 1022, not to port 22,

> Here is my ipnat.rule for each machine:
> rdr xl0 0.0.0.0/0 port 1022 -> 192.168.1.10 port 1022

This redirects to port 1022, not to port 22.

> The connection on port 1022 isn't working. What command am I missing?

You should redirect to port 22, and allow connections to that port.
Also note that ipf sees the translated ports/addresses, not the
'original' ones.

 - Philip

-- 
Philip Paeps
  To spot the expert, pick the one who predicts the job
  will take the longest and cost the most.


Relevant Pages

  • Re: Need help with bandwidth management . . .
    ... also be a good time to separate the wired from the wireless parts of ... wired connections. ... QoS lan port settings, and I cannot get anything consistent. ... switch ports and limit the bandwidth per port (the settings are ...
    (alt.internet.wireless)
  • Re: Iptables FTP question
    ... for secondary connections. ... Some ftp servers don't allow passive mode because it is less safe from ... algs that allow port mode for client machines. ...
    (comp.security.firewalls)
  • Re: Need Help on setting up a small home site.
    ... > told me that I have to open that port and forward request to my ... computer is the first network device. ... connections to port 80, so that they can be routed through to something ... > So if U don't consider it rude to post a long config file here, ...
    (comp.infosystems.www.servers.unix)
  • Re: Looking for program that emails me when dhcp addr changes
    ... For SSH all you need forwarded is TCP Port 22... ... >>participate in TCP connections or UDP conversations it initiates but ...
    (comp.security.ssh)
  • RE: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
    ... Polling For 100 mbps Connections? ... TCP port 5001 TCP window size: ... on pci0 pci1: on pcib1 ... 0xd0400000-0xd041ffff,0xd0460000-0xd0460fff irq 10 at device 15.0 on pci0 ...
    (freebsd-questions)