Skip to contentSkip to conversation

(No subject header)

DISCUSSION John Black 2 participants 3 messages Jul 28, 2004 – Jul 30, 2004

lore
Share & tools
lore

John Black

author
#0 lore raw

I have a NAT question for everyone.

At work i have a single static IP address that all of the computers in the LAN uses for the outside world. My firewall is also acting as a dns server.

Question 1: When i try to ssh in to a computer from the outside world it follows the first rule. But when i change ssh to listen to a certain address and port it still defaults to the first rule?

Question 2: if the DNS server was running on a server behind the firewall would this help sloves this problem?

thanks
john

#1 lore raw
Quoted 3 lines · John Black

At work i have a single static IP address that all of the computers in the LAN uses for the outside world. My firewall is also acting as a dns server.

Okay, so you have one public IP address, and all your internal machines are masqueraded behind that one address for outbound connections; also your firewall runs DNS (although it's not clear whether you mean it runs caching DNS for internal clients, or also authoritative DNS for external queries about your domain).

Quoted 2 lines

Question 1: When i try to ssh in to a computer from the outside world it follows the first rule.

What is "the first rule"?

Quoted 2 lines

But when i change ssh to listen to a certain address and port it still defaults to the first rule?

What is the question here?

Quoted 2 lines

Question 2: if the DNS server was running on a server behind the firewall would this help sloves this problem?

Don't know. Tell us what the problem is (and what sort of DNS server you're
running), and we might be able to think of the answer.

Posting your netfilter rules might help us understand what you're asking about, as well.

Regards,

Antony.

Signature · 7 lines
Success is a lousy teacher.  It seduces smart people into thinking they can't 
lose.

 - William H Gates III

                                                     Please reply to the list;
                                                           please don't CC me.
author
#2 lore raw
Quoted 2 lines

Okay, so you have one public IP address, and all your internal machines

are

Quoted 2 lines

masqueraded behind that one address for outbound connections; also your firewall runs DNS (although it's not clear whether you mean it runs

caching

Quoted 2 lines

DNS for internal clients, or also authoritative DNS for external queries about your domain).

i have a caching dns sserver for the inside of the lan, but external queries are
handled by the companies dns server

Quoted 1 line

What is "the first rule"?

iptables -t nat -A PREROUTING -d X.X.X.X -p tcp --dport 22 -j DNAT \
-- to 192.168.1.89:2222 (ares)

iptables -t nat -A PREROUTING -d X.X.X.X -p tcp --dport 22 -j DNAT \
-- to 192.168.1.90:22222 (zeus)

i asigned that workstation to listen to that port.

when i ssh into zeus from the outside world it says connecting to zeus, but at the bash prompt it is ares

im running BIND 9 on red hat 9

thanks
john