Networking Forums

Networking Forums > Computer Networking > Linux Networking > Short question on IPTABLES - Please

Reply
Thread Tools Display Modes

Short question on IPTABLES - Please

 
 
ExecMan
Guest
Posts: n/a

 
      11-15-2006, 03:59 AM
Hi All,

I was trying to change the port that SSH will come in on. After
changing the config file, I also needed to change the IPTABLES config.

Well, I quickly edited the file, and once I did that, I noticed that
the port numbers are no longer listed when I do: iptables -L:

8 ACCEPT tcp -- anywhere anywhere state
NEW tcp dpt:ssh
9 ACCEPT tcp -- anywhere anywhere state
NEW tcp dpt:http
10 ACCEPT tcp -- anywhere anywhere state
NEW tcp dpt:smtp

It used to say the port numbers:

7 ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
8 ACCEPT tcp -- anywhere anywhere state
NEW tcp 22:ssh
9 ACCEPT tcp -- anywhere anywhere state
NEW tcp 80:http
10 ACCEPT tcp -- anywhere anywhere state
NEW tcp 25:smtp

The port numbers are in the config file:

-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j
ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j
ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j
ACCEPT

Why do they not get listed anymore? Did I screw something up? How do
I get the port numbers back? Also, how can I change the port on the
SSH line???

Thanks!!!

 
Reply With Quote
 
 
 
 
ExecMan
Guest
Posts: n/a

 
      11-15-2006, 04:13 AM

If I can add to that, even after changing the sshd_config file & the
iptables firewall, when I try and connect on the new port using ssh, I
get an error that says "No Route To Host".

Any ideas?

Thanks a bunch!

 
Reply With Quote
 
Joe Beasley
Guest
Posts: n/a

 
      11-15-2006, 06:35 PM
The names are coming from /etc/services.

To see the number, use iptables -L -N

--
(E-Mail Removed)
SDF Public Access UNIX System - http://sdf.lonestar.org
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables question adam Linux Networking 1 07-13-2005 07:14 PM
iptables question Coenraad Loubser Linux Networking 2 03-11-2005 04:36 PM
iptables question.... sam Linux Networking 0 09-22-2003 03:27 PM
Iptables question.. ishwar Linux Networking 1 07-17-2003 03:11 PM
IPTables question kza@wah.ath.cx Linux Networking 1 07-09-2003 04:34 AM



1 2 3 4 5 6 7 8 9 10 11