Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables / Samba / internet connectivity

Reply
Thread Tools Display Modes

iptables / Samba / internet connectivity

 
 
CCW
Guest
Posts: n/a

 
      01-26-2008, 04:50 PM
Hi,

I've got Samba working (eventually!), and tracked it down to my
iptables configuration. I assume that iptables starts when linux boots
up. In this state, I can't access my samba server from my Windows
machines, but my windows machines can access the internet.

However, when I run,

[root@server~]service iptables stop

I can access samba (set my shares as mapped networked drives etc), but
internet connectivity stops. If I restart iptables, internet
connectivity is restored, but connection to samba stops!

My network is set up as:

Router (192.168.0.1) ----- fc7 server (eth0) 192.168.0.3 -- (eth1)
192.168.1.100 ----- Windows network (192.168.1.100-120)

When I can't access the internet, I can't ping eth0 (192.168.0.3) or
the router.

Can anyone point me in the direction of a decent tutorial explaining
how to set up iptables to allow my internal network (192.168.1.*)
access to the internet?

Thanks,
Chris
 
Reply With Quote
 
 
 
 
Thorsten Kohlhepp
Guest
Posts: n/a

 
      01-26-2008, 06:45 PM
CCW wrote:
> Hi,
>
> I've got Samba working (eventually!), and tracked it down to my
> iptables configuration. I assume that iptables starts when linux boots
> up. In this state, I can't access my samba server from my Windows
> machines, but my windows machines can access the internet.
>
> However, when I run,
>
> [root@server~]service iptables stop
>
> I can access samba (set my shares as mapped networked drives etc), but
> internet connectivity stops. If I restart iptables, internet
> connectivity is restored, but connection to samba stops!
>
> My network is set up as:
>
> Router (192.168.0.1) ----- fc7 server (eth0) 192.168.0.3 -- (eth1)
> 192.168.1.100 ----- Windows network (192.168.1.100-120)
>
> When I can't access the internet, I can't ping eth0 (192.168.0.3) or
> the router.
>
> Can anyone point me in the direction of a decent tutorial explaining
> how to set up iptables to allow my internal network (192.168.1.*)
> access to the internet?
>
> Thanks,
> Chris

Run an iptables --list and check the policy of your firewall rules. To
remove all rules run iptables -F and change the policy to ACCEPT with
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
That means no firewall is running and you accept any traffic IN, OUT and
FORWARD.
This should also allow connections to your samba server.
Ciao
thorko
 
Reply With Quote
 
7
Guest
Posts: n/a

 
      01-26-2008, 07:30 PM
CCW wrote:

> Hi,
>
> I've got Samba working (eventually!), and tracked it down to my
> iptables configuration. I assume that iptables starts when linux boots
> up. In this state, I can't access my samba server from my Windows
> machines, but my windows machines can access the internet.
>
> However, when I run,
>
> [root@server~]service iptables stop
>
> I can access samba (set my shares as mapped networked drives etc), but
> internet connectivity stops. If I restart iptables, internet
> connectivity is restored, but connection to samba stops!
>
> My network is set up as:
>
> Router (192.168.0.1) ----- fc7 server (eth0) 192.168.0.3 -- (eth1)
> 192.168.1.100 ----- Windows network (192.168.1.100-120)
>
> When I can't access the internet, I can't ping eth0 (192.168.0.3) or
> the router.
>
> Can anyone point me in the direction of a decent tutorial explaining
> how to set up iptables to allow my internal network (192.168.1.*)
> access to the internet?
>
> Thanks,
> Chris



Not to subtract from what you have accomplished, you may find ssh
a lot easier to set up and use. It has 128 bit encryption
so you can use it right across the globe.

After enabling ssh, you can log in via command line, or I find
easier - konqueror. Typing a url like this...
fish://username@ipaddress to login. You can have multiple tabs open
to connect to multiple servers securely and transfer files with
cut and paste or drag and drop.

From windopws, you can run winscp which gives you drag and drop
file copy with ssh.


 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      01-27-2008, 02:53 AM
CCW <(E-Mail Removed)> wrote:
> Hi,


> I've got Samba working (eventually!), and tracked it down to my
> iptables configuration. I assume that iptables starts when linux boots
> up. In this state, I can't access my samba server from my Windows
> machines, but my windows machines can access the internet.


> However, when I run,


> [root@server~]service iptables stop


> I can access samba (set my shares as mapped networked drives etc), but
> internet connectivity stops. If I restart iptables, internet
> connectivity is restored, but connection to samba stops!


> My network is set up as:


> Router (192.168.0.1) ----- fc7 server (eth0) 192.168.0.3 -- (eth1)
> 192.168.1.100 ----- Windows network (192.168.1.100-120)


> When I can't access the internet, I can't ping eth0 (192.168.0.3) or
> the router.


> Can anyone point me in the direction of a decent tutorial explaining
> how to set up iptables to allow my internal network (192.168.1.*)
> access to the internet?


A decent tutorial would likely have to be distribution-specific unless
you are thinking of building your own firewall from scratch. However,
here is something to try when the firewall is up:

iptables -I INPUT -i eth1 -p TCP -m multiport --dports 135,139,445 -j ACCEPT
iptables -I INPUT -i eth1 -p UDP -m multiport --dports 137,138 -j ACCEPT

These commands are based on

http://us4.samba.org/samba/docs/man/...#firewallports

If they provide access to the samba server then perhaps you can find an
appropriate place or way to add their equivalents to the fc7 iptables
setup.

Briefly, the commands insert rules at the beginning of the INPUT chain
which should allow input to fc7 from the Windows network on samba net-bios
ports, and may allow samba to work if fc7 output to the Windows network
is unfettered. No guarantee, I don't use fedora or do Windows.

--
Clifford Kite

 
Reply With Quote
 
CCW
Guest
Posts: n/a

 
      02-03-2008, 11:13 AM
On Jan 27, 3:53 am, Clifford Kite <k...@not.available.tld> wrote:
> CCW <c.c.w...@gmail.com> wrote:
> > Hi,
> > I've got Samba working (eventually!), and tracked it down to my
> > iptables configuration. I assume that iptables starts when linux boots
> > up. In this state, I can't access my samba server from my Windows
> > machines, but my windows machines can access the internet.
> > However, when I run,
> > [root@server~]service iptables stop
> > I can access samba (set my shares as mapped networked drives etc), but
> > internet connectivity stops. If I restart iptables, internet
> > connectivity is restored, but connection to samba stops!
> > My network is set up as:
> > Router (192.168.0.1) ----- fc7 server (eth0) 192.168.0.3 -- (eth1)
> > 192.168.1.100 ----- Windows network (192.168.1.100-120)
> > When I can't access the internet, I can't ping eth0 (192.168.0.3) or
> > the router.
> > Can anyone point me in the direction of a decent tutorial explaining
> > how to set up iptables to allow my internal network (192.168.1.*)
> > access to the internet?

>
> A decent tutorial would likely have to be distribution-specific unless
> you are thinking of building your own firewall from scratch. However,
> here is something to try when the firewall is up:
>
> iptables -I INPUT -i eth1 -p TCP -m multiport --dports 135,139,445 -j ACCEPT
> iptables -I INPUT -i eth1 -p UDP -m multiport --dports 137,138 -j ACCEPT
>
> These commands are based on
>
> http://us4.samba.org/samba/docs/man/...ion/securing-s...
>
> If they provide access to the samba server then perhaps you can find an
> appropriate place or way to add their equivalents to the fc7 iptables
> setup.
>
> Briefly, the commands insert rules at the beginning of the INPUT chain
> which should allow input to fc7 from the Windows network on samba net-bios
> ports, and may allow samba to work if fc7 output to the Windows network
> is unfettered. No guarantee, I don't use fedora or do Windows.
>
> --
> Clifford Kite


Thanks, that worked perfectly!

Chris
 
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
Samba / internet iptables CCW Linux Networking 0 05-05-2008 11:53 AM
Still trying to get Linux/SAMBA connectivity Norm Dresner Linux Networking 5 11-26-2004 07:16 PM
PoPTop, Samba, IPTables Sebastian Araya Linux Networking 1 06-30-2004 11:00 PM
Iptables and SAMBA - I'm going MAAAAAAAAAAAAAAAAAADDDDDDD!!! Arsenio Lupin Linux Networking 5 11-15-2003 07:15 AM
CHALLENGE: partial internet connectivity under linux where as win98 gives full connectivity on same machine Vishal Gupta Linux Networking 0 08-17-2003 04:29 PM



1 2 3 4 5 6 7 8 9 10 11