LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-13-2004, 01:44 AM   #31
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50

Quote:
Originally posted by tommytomato

login as: root
root@192.168.0.28's password:
Access denied
root@192.168.0.28's password:

TT
are u sure that u enter the corect password for root. ssh works. and iptables allow xp to connect shh port.
 
Old 05-13-2004, 01:57 AM   #32
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Quote:
are u sure that u enter the corect password for root. ssh works. and iptables allow xp to connect shh port.
Yes i can log in, when using the PC it self..

/etc/init.d/sshd status sshd ( pid 487 ) is running

as to iptables i haven't used them before, so i'm kind of lost there

TT
 
Old 05-13-2004, 03:55 AM   #33
mobassir
Member
 
Registered: Jul 2003
Location: Pakistan
Distribution: Redhat , SME
Posts: 346

Rep: Reputation: 30
hello

I wants to shrae internet from my linux box with dialup modem, like we use windows 2000 or windows xp internet sharing feature.

i have Redhat 7.3 on system where is modem is install. what is the easy and best way to share internet.

If any one know please guied me step be step

thanks Alot
 
Old 05-13-2004, 03:59 AM   #34
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
I think you posted in the wrong area !

TT
 
Old 05-13-2004, 04:07 AM   #35
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
if u see ssh login screen in xp box, this means u dont need to configure iptables. u may need to configure ssh server. check its configuration.

www.netfilter.org the offical web site of iptables. but its not easy to learn iptables. u beter search iptables scripts. and try to understand it. iptables is great tool wihch can do NAT, port NAT, firewall, port redirection... it allows us to do what in our mind. because of this it is not basic.

u really dont need firewall for linux box in this situation. but if u think to share internet via linux. visit www.iptables-script.dk . u also may prefer squid cache proxy server to increase performans.
 
Old 05-13-2004, 04:13 AM   #36
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
tommytomato
let ppl ask their questions.

why doesnt mobassir ask questions about iptables in this post? we are talking about iptables.
remeber i dont have to help u nor mobassir.
but i like to help ppl. so i try to help u. and surely i will try to help mobassir.
respect ppl please.
 
Old 05-13-2004, 04:15 AM   #37
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
If i log in via XP using PuTTY i get access NO

but it does open up, i enter root then it checks i think then ask for pass then i get the error.

When using WinSCP3 I make a new session then enter IP user root and password then another little box pop's up asking for password ( 'root@192.168.1.28session password' ) is what the box is. I enter the pass again then get another little pop up saying ( Auth Failed )


TT
 
Old 05-13-2004, 04:18 AM   #38
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Is that what he wants to do to..as well

He was alittle hard to understand..

Opp's I didn't mean any thing by it

TT
 
Old 05-13-2004, 04:21 AM   #39
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
what does it say in /var/log/messages about ssh?
 
Old 05-13-2004, 04:24 AM   #40
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
I was just in vi sshd_config

but i'll have a look

TT
 
Old 05-13-2004, 04:29 AM   #41
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
what should I be looking for ?
I see Hostkey etc etc

I see httpd startup succeeded and MySQL and Postfix

No ssh in there

TT
 
Old 05-13-2004, 04:42 AM   #42
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
here is my log file.
#cat /var/log/messages | grep sshd

May 13 09:35:34 localhost sshd(pam_unix)[12471]: session opened for user root by (uid=0)
May 13 09:35:59 localhost sshd(pam_unix)[12471]: session closed for user root
May 13 12:41:30 localhost sshd(pam_unix)[13033]: session opened for user root by (uid=0)


and ssh_conf
#cat /etc/ssh/ssh_config
Host *
ForwardX11 yes
 
Old 05-13-2004, 04:44 AM   #43
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
maxut

I just used that page you were talking about.
Iptables Script Generator---> http://iptables-script.dk/index1.php

I put in the tinysofa IP 192.168.0.28 and clicked all boxes

Code:
#!/bin/sh

# iptables script generator: V0.1-2002
# Comes with no warranty!
# e-mail: michael@1go.dk

# Diable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward

LAN_IP_NET='192.168.0.1/24'
LAN_NIC='eth1'
WAN_IP='202.72.131.230'
WAN_NIC='eth0'
FORWARD_IP='192.168.0.28'

# load some modules (if needed)
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp

# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# enable Masquerade and forwarding
iptables -t nat -A POSTROUTING -s $LAN_IP_NET -j MASQUERADE
iptables -A FORWARD -j ACCEPT -i $LAN_NIC -s $LAN_IP_NET
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Open ports to server on LAN
iptables -A FORWARD -j ACCEPT -p tcp --dport 80
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.0.28:80
iptables -A FORWARD -j ACCEPT -p tcp --dport 21
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 21 -j DNAT --to 192.168.0.28:21
iptables -A FORWARD -j ACCEPT -p tcp --dport 22
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 22 -j DNAT --to 192.168.0.28:22
iptables -A FORWARD -j ACCEPT -p tcp --dport 25
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25 -j DNAT --to 192.168.0.28:25
iptables -A FORWARD -j ACCEPT -p tcp --dport 110
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 110 -j DNAT --to 192.168.0.28:110

# Enable forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
This i'm unsure about WAN_IP='202.72.131.230'
that IP is not my ADSL unit IP..

And this one LAN_IP_NET='192.168.0.1/24' I have IP address higher than that cant i edit them ?

I'm not sure if this is right, how would applied that the tiny sofa using floppy ?

TT
 
Old 05-13-2004, 04:48 AM   #44
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
Quote:
Originally posted by maxut

u really dont need firewall for linux box in this situation. but if u think to share internet via linux. visit www.iptables-script.dk . u also may prefer squid cache proxy server to increase performans.
i said if u thougth to share internet via linux, u might use that script.
this was also answer for mobassir's question
 
Old 05-13-2004, 04:52 AM   #45
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
I see

That X11 is that a GUI thing ?

under Host* i have

# ForwardAgent no
# ForwardX11 no

Its a shame i cant copy and paste what i got untill i get in via putty

TT
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot ping linux box from XP box antare Linux - Networking 10 03-10-2005 10:48 AM
canīt ping my linux box by its name :( pavalosv Linux - Networking 3 01-13-2005 11:03 PM
can't ping linux box jammy3 Linux - Newbie 3 12-03-2004 11:33 AM
Cannot ping the linux box amirbhai Linux - Networking 4 06-25-2004 04:43 PM
Can't ping linux box Zero Linux - Networking 4 05-11-2002 01:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration