| View previous topic :: View next topic |
| Author |
Message |
RlC Guru


Joined: 30 Jul 2005 Posts: 358 Location: austria
|
Posted: Wed Aug 31, 2005 6:33 pm Post subject: |
|
|
thank you |
|
| Back to top |
|
 |
StarDragon Guru


Joined: 19 Jun 2005 Posts: 390 Location: tEXas
|
Posted: Wed Aug 31, 2005 6:42 pm Post subject: |
|
|
Ever since I installed shorewall I see these weird rejections in my dmesg file:
| Code: |
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.181.68.115 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=5787 DF PROTO=TCP SPT=38565 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.110.181.67 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=23173 DF PROTO=TCP SPT=49223 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.151.233.226 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=40173 DF PROTO=TCP SPT=57351 DPT=6349 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.153.2.180 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=18765 DF PROTO=TCP SPT=49391 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.168.178.88 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=15102 DF PROTO=TCP SPT=57104 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=224.0.0.251 LEN=110 TOS=0x00 PREC=0x00 TTL=255 ID=10 DF PROTO=UDP SPT=5353 DPT=5353 LEN=90
|
I have no idea what could be causing this.  _________________ "After all, a person's a person, no matter how small."--Horton Hears A Who! |
|
| Back to top |
|
 |
Specialized Apprentice


Joined: 11 Jan 2005 Posts: 264
|
Posted: Thu Sep 01, 2005 9:11 am Post subject: |
|
|
| I got it working. For ntp-clients and ntpd you need to open the udp-Port 123. |
|
| Back to top |
|
 |
piraeus n00b


Joined: 18 Oct 2003 Posts: 41
|
Posted: Thu Sep 01, 2005 4:30 pm Post subject: RTSP streaming |
|
|
Got gxine working w/ bbc radio streams etc. (RTSP), just wanted to add it here in case someone's looking for it. I'd assume it'd be the same for mplayer etc. See http://www.cs.columbia.edu/~hgs/rtsp/
/etc/shorewall/rules:
| Code: |
ACCEPT fw net tcp 554 #Real Time Stream Control Protocol
ACCEPT fw net udp 554
|
|
|
| Back to top |
|
 |
slackthumbz Tux's lil' helper


Joined: 03 Mar 2005 Posts: 142 Location: Cambridge, UK
|
Posted: Fri Sep 23, 2005 1:29 pm Post subject: |
|
|
How would I set up shorewall to allow me to run traceroutes? my current rules file looks like this:
| Code: | ####################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/
# PORT PORT(S) DEST LIMIT GROUP
ACCEPT fw net tcp 80 #http
ACCEPT fw net udp 80 #http
ACCEPT fw net tcp 443 #https
ACCEPT fw net udp 443 #https
ACCEPT fw net tcp 21 #ftp
ACCEPT fw net tcp 53 #DNS
ACCEPT fw net udp 53 #DNS
ACCEPT fw net tcp 110 #unsecure Pop3
ACCEPT fw net tcp 995 #Secure Pop3
ACCEPT fw net tcp 873 #rsync
ACCEPT fw net tcp 25 #unsecure SMTP
ACCEPT fw net tcp 465 #SMTP over SSL
ACCEPT fw net tcp 5190 #AIM/ICQ
ACCEPT fw net tcp 6667 #IRC
ACCEPT fw net udp 6667 #IRC
ACCEPT fw net tcp 1863 #MSN
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
|
|
|
| Back to top |
|
 |
Matteo Azzali Retired Dev


Joined: 23 Sep 2004 Posts: 1133
|
Posted: Sun Sep 25, 2005 9:57 pm Post subject: |
|
|
I've read the tutorial and I have just a question:
rules seems pretty easy, how do shorewall "resists" to:
SYN Flooding,
Ping of death ,
invalid state flag combinations (scans),
etc.etc.?
there are rules "behind the userspace" doin this, or there aren't at all?
(just to know if I'm protected with this setup...) _________________ Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/ |
|
| Back to top |
|
 |
winston_nolan n00b

Joined: 24 Aug 2004 Posts: 71 Location: cape town, south africa
|
Posted: Mon Sep 26, 2005 7:06 pm Post subject: |
|
|
good day guys, please xcuse this long post by i got my ass in a sling here that i cant seem to get out of.
#some info relating to my setup
i have a gentoo gateway with 3 interfaces
eth0=internel interface[10.1.30.252]
eth1=isp1externel interface[10.1.30.252]--->initial gateway (isp1) 10.1.30.254
eth2=isp2 wireless interface[192.168.1.22]--->second gateway (isp2) 196.*.*.*
my lan computers have a gateway of 10.1.30.252 and they get this via dhcp. the gateway have a gateway of 10.1.30.254 (my first isp's router).
i have also in /etc/sysctl.conf --> net.ipv4.ip_forward = 1
i have shorewall and squid(3128, transparent proxy) setup on the gateway and it's working fine, the workstations can surf and all is sweet.
#what i want to do - here is where it gets dodgy %-/
i want to drop(leave) isp1 and push all my traffic through isp2 (over my wireless line)
now i figure i can do this with two ways.
1.use shorewall and its routing capabilities (http://www.shorewall.net/Shorewall_and_Routing.html)
2.i can set the gateway of my gateway to the ip of a box on the otherside of the wireless.
#this is what i have done on my "to be gateway" (box on the otherside of the wireless
i have set /etc/sysctl.conf --> net.ipv4.ip_forward = 1
installed shorewall and iptables and used the two-interface example (http://www.shorewall.net/two-interface.htm)
shorewall starts fine i will include the status at the end of this post.
added the ip of this machine as the gateway of my gateway to my lan pc's
i also checked the route and all seems fine but i cannot ping anything except the internel ip of this machine(the new gateway)
i am not sure if i am correct here, please feel free to add advice
guys, i have been hitting my head against a brick wall for the past week i seriously would appreciate it if the gurus out there could not tell me if there is a gentoo specific way of doing this, or, has anyone done this with shorewall?
#shorewall status
root@elcubano ~ # shorewall status
Shorewall-2.4.2 Status at elcubano - Mon Sep 26 21:01:41 SAST 2005
Counters reset Mon Sep 26 20:26:34 SAST 2005
Chain INPUT (policy DROP 139 packets, 9204 bytes)
pkts bytes target prot opt in out source destination
177 13015 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
7 1506 ACCEPT all -- eth1 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- eth0 * 192.168.1.0/24 0.0.0.0/0
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT all -- eth1 eth0 0.0.0.0/0 192.168.1.0/24
0 0 ACCEPT all -- eth0 eth1 192.168.1.0/24 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 132 packets, 14853 bytes)
pkts bytes target prot opt in out source destination
NAT Table
Chain PREROUTING (policy ACCEPT 5899 packets, 436K bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 37 packets, 2793 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 37 packets, 2793 bytes)
pkts bytes target prot opt in out source destination
Mangle Table
Chain PREROUTING (policy ACCEPT 9229 packets, 677K bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 8531 packets, 510K bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 7175 packets, 887K bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 7175 packets, 887K bytes)
pkts bytes target prot opt in out source destination
tcp 6 431652 ESTABLISHED src=192.168.1.10 dst=192.168.1.22 sport=57733 dport=445 packets=19435 bytes=11072913 src=192.168.1.22 dst=192.168.1.10 sport=445 dport=57733 packets=19938 bytes=11663290 [ASSURED] mark=0 use=1
tcp 6 425153 ESTABLISHED src=192.168.1.22 dst=192.168.1.255 sport=41164 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.1.255 dst=192.168.1.22 sport=80 dport=41164 packets=0 bytes=0 mark=0 use=1
tcp 6 431999 ESTABLISHED src=192.168.1.22 dst=192.168.1.10 sport=58179 dport=22 packets=22017 bytes=1341560 src=192.168.1.10 dst=192.168.1.22 sport=22 dport=58179 packets=19619 bytes=3373022 [ASSURED] mark=0 use=1
tcp 6 425146 ESTABLISHED src=192.168.1.22 dst=192.168.1.0 sport=41165 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.1.0 dst=192.168.1.22 sport=80 dport=41165 packets=0 bytes=0 mark=0 use=1
tcp 6 425146 ESTABLISHED src=192.168.1.22 dst=192.168.1.0 sport=41164 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.1.0 dst=192.168.1.22 sport=80 dport=41164 packets=0 bytes=0 mark=0 use=1
IP Configuration
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:a1:7a:b5:44 brd ff:ff:ff:ff:ff:ff
inet 196.36.166.122/25 brd 196.36.166.129 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:a1:45:54:bf brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global eth1
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 00:0d:61:40:dc:09 brd ff:ff:ff:ff:ff:ff
IP Stats
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped overrun mcast
3584 8 0 0 0 0
TX: bytes packets errors dropped carrier collsns
3584 8 0 0 0 0
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:a1:7a:b5:44 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
20302710 74499 0 0 0 0
TX: bytes packets errors dropped carrier collsns
42324779 40717 0 0 0 0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:a1:45:54:bf brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
33650191 85698 0 0 0 0
TX: bytes packets errors dropped carrier collsns
27614176 74105 0 0 0 1
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 00:0d:61:40:dc:09 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
/proc
/proc/sys/net/ipv4/ip_forward = 1
/proc/sys/net/ipv4/icmp_echo_ignore_all = 0
/proc/sys/net/ipv4/conf/all/proxy_arp = 0
/proc/sys/net/ipv4/conf/all/arp_filter = 0
/proc/sys/net/ipv4/conf/all/rp_filter = 1
/proc/sys/net/ipv4/conf/all/log_martians = 1
/proc/sys/net/ipv4/conf/default/proxy_arp = 0
/proc/sys/net/ipv4/conf/default/arp_filter = 0
/proc/sys/net/ipv4/conf/default/rp_filter = 0
/proc/sys/net/ipv4/conf/default/log_martians = 1
/proc/sys/net/ipv4/conf/eth0/proxy_arp = 0
/proc/sys/net/ipv4/conf/eth0/arp_filter = 0
/proc/sys/net/ipv4/conf/eth0/rp_filter = 0
/proc/sys/net/ipv4/conf/eth0/log_martians = 1
/proc/sys/net/ipv4/conf/eth1/proxy_arp = 0
/proc/sys/net/ipv4/conf/eth1/arp_filter = 0
/proc/sys/net/ipv4/conf/eth1/rp_filter = 1
/proc/sys/net/ipv4/conf/eth1/log_martians = 0
/proc/sys/net/ipv4/conf/lo/proxy_arp = 0
/proc/sys/net/ipv4/conf/lo/arp_filter = 0
/proc/sys/net/ipv4/conf/lo/rp_filter = 0
/proc/sys/net/ipv4/conf/lo/log_martians = 0
Routing Rules
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
Table default:
Table local:
broadcast 192.168.1.0 dev eth1 proto kernel scope link src 192.168.1.10
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 196.36.166.0 dev eth0 proto kernel scope link src 196.36.166.122
broadcast 196.36.166.129 dev eth0 proto kernel scope link src 196.36.166.122
broadcast 192.168.1.255 dev eth1 proto kernel scope link src 192.168.1.10
local 196.36.166.122 dev eth0 proto kernel scope host src 196.36.166.122
local 192.168.1.10 dev eth1 proto kernel scope host src 192.168.1.10
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
broadcast 196.36.166.127 dev eth0 proto kernel scope link src 196.36.166.122
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
Table main:
196.36.166.0/25 dev eth0 proto kernel scope link src 196.36.166.122
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.10
127.0.0.0/8 via 127.0.0.1 dev lo scope link
default via 196.36.166.1 dev eth0
ARP
? (192.168.1.22) at 00:02:6F:35:60:67 [ether] on eth1
Modules
ipt_REJECT 4544 0
ipt_pkttype 1856 0
ipt_CONNMARK 2368 0
ipt_connmark 1920 0
ipt_owner 3584 0
ipt_recent 9996 0
ipt_iprange 1984 0
ipt_multiport 2624 0
ipt_conntrack 2496 0
ip_nat_irc 2560 0
ip_nat_tftp 1984 0
ip_nat_ftp 3200 0
ip_conntrack_irc 71184 1 ip_nat_irc
ip_conntrack_tftp 3664 1 ip_nat_tftp
ip_conntrack_ftp 71952 1 ip_nat_ftp
ipt_REDIRECT 2176 0
ipt_LOG 6848 0
ipt_limit 2432 0
ipt_state 1984 2
ipt_MASQUERADE 3136 0
root@elcubano ~ #
thanks to all, |
|
| Back to top |
|
 |
Matteo Azzali Retired Dev


Joined: 23 Sep 2004 Posts: 1133
|
Posted: Tue Sep 27, 2005 2:57 pm Post subject: |
|
|
Ok, I had to admit, I choosed kmyfirewall since it allows me
to define sourceports and destports for any connection.
But I'm using your method to log to a separate file with syslog-ng,
and I have a question: is it safe to use chmod to lower the permissions
on the firewall logfile? (read permissions to all users...) _________________ Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/ |
|
| Back to top |
|
 |
Bob P Advocate


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Wed Sep 28, 2005 8:04 am Post subject: |
|
|
| StarDragon wrote: | Ever since I installed shorewall I see these weird rejections in my dmesg file:
| Code: |
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.181.68.115 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=5787 DF PROTO=TCP SPT=38565 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.110.181.67 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=23173 DF PROTO=TCP SPT=49223 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.151.233.226 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=40173 DF PROTO=TCP SPT=57351 DPT=6349 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.153.2.180 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=18765 DF PROTO=TCP SPT=49391 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.168.178.88 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=15102 DF PROTO=TCP SPT=57104 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=224.0.0.251 LEN=110 TOS=0x00 PREC=0x00 TTL=255 ID=10 DF PROTO=UDP SPT=5353 DPT=5353 LEN=90
|
I have no idea what could be causing this.  |
give this a shot and see if it helps:
| Code: | | /bin/ls /etc/init.d/net.eth* | xargs -n1 ln -sfvn net.lo |
_________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
| Back to top |
|
 |
cpu Tux's lil' helper


Joined: 09 Nov 2003 Posts: 122 Location: POLAND/ZG
|
Posted: Fri Sep 30, 2005 1:18 pm Post subject: |
|
|
| StarDragon wrote: | Ever since I installed shorewall I see these weird rejections in my dmesg file:
| Code: |
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.181.68.115 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=5787 DF PROTO=TCP SPT=38565 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.110.181.67 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=23173 DF PROTO=TCP SPT=49223 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.151.233.226 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=40173 DF PROTO=TCP SPT=57351 DPT=6349 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.153.2.180 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=18765 DF PROTO=TCP SPT=49391 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=12.168.178.88 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=15102 DF PROTO=TCP SPT=57104 DPT=6348 WINDOW=5840 RES=0x00 SYN URGP=0
Shorewall:all2all:REJECT:IN= OUT=eth0 SRC=192.168.1.102 DST=224.0.0.251 LEN=110 TOS=0x00 PREC=0x00 TTL=255 ID=10 DF PROTO=UDP SPT=5353 DPT=5353 LEN=90
|
I have no idea what could be causing this.  |
Same problem here  _________________ [img]http://imagegen.last.fm/top5-green/artists/cpu.gif[/img] |
|
| Back to top |
|
 |
Bob P Advocate


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Thu Oct 13, 2005 5:09 am Post subject: |
|
|
| Bob P wrote: | give this a shot and see if it helps:
| Code: | | /bin/ls /etc/init.d/net.eth* | xargs -n1 ln -sfvn net.lo |
|
be careful to properly differentiate between the lowercase "L" and the number "one", or the solution won't help you.
here's the text enlarged for clarity:
/bin/ls /etc/init.d/net.eth* | xargs -n1 ln -sfvn net.lo _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
| Back to top |
|
 |
slyyls Tux's lil' helper

Joined: 27 Aug 2004 Posts: 89 Location: Ottawa
|
Posted: Sun Oct 30, 2005 1:11 am Post subject: |
|
|
Hey,
Quick question, I have a loptop that connects via router to the internet. I want to install shorewall on the laptop in case i visit someone or i case i want to put myselft in the Routers DMZ. The same network card (could be eth0 --wired or eth1 --wireless) will be used to access the internet and the local network. If i want to allow total access to my laptop from the local network (samba, ssh, etc), but not the internet, how do i build this rule. I think it's something along the lines:
| Code: | | ACCEPT net:192.168.0.0/24 fw - - |
Can anyone help me out?
Thanks,
Sly |
|
| Back to top |
|
 |
Stormkings Guru


Joined: 27 Sep 2002 Posts: 352 Location: Europe
|
Posted: Sun Nov 06, 2005 4:34 pm Post subject: |
|
|
Hi everyone,
I would like to enable multicast streaming through my firewall. Any suggestions how to do that? There is only very few information available.
Thanks in advance, dk |
|
| Back to top |
|
 |
krolden Apprentice


Joined: 28 May 2004 Posts: 293 Location: Belgium
|
Posted: Sun Nov 06, 2005 5:39 pm Post subject: |
|
|
| slyyls wrote: | Hey,
Quick question, I have a loptop that connects via router to the internet. I want to install shorewall on the laptop in case i visit someone or i case i want to put myselft in the Routers DMZ. The same network card (could be eth0 --wired or eth1 --wireless) will be used to access the internet and the local network. If i want to allow total access to my laptop from the local network (samba, ssh, etc), but not the internet, how do i build this rule. I think it's something along the lines:
| Code: | | ACCEPT net:192.168.0.0/24 fw - - |
Can anyone help me out?
Thanks,
Sly |
Have you set norfc1918 in your interfaces list?
| Code: |
This interface should not receive any packets whose source is in one of the ranges reserved by RFC 1918 (i.e., private or "non-routable" addresses. If packet mangling is enabled in shorewall.conf, packets whose destination addresses are reserved by RFC 1918 are also rejected. |
|
|
| Back to top |
|
 |
Dr_Stein Guru

Joined: 21 Mar 2003 Posts: 303 Location: Mountain View, CA
|
|
| Back to top |
|
 |
My_World Guru


Joined: 01 Sep 2003 Posts: 339 Location: Kalahari Desert
|
Posted: Wed Nov 23, 2005 7:50 pm Post subject: |
|
|
Have a similar problem to winston_nolan, so if anyone can please help me sort this I would be very gratefull indeed!
My Setup-
Firewall/router/gateway machine with the following setup:
ppp0 internet (modem connection)
eth0 wired lan (gateway for wired network)
wlan0 wireless network (wireless card configured to be access point)
The problem, as soon as I start the firewall I have no access to the wireless network or an internet connection for wireless network. I cannot even ping the router/firewall PC! The wired network works 100%.
I have tried numours config options and still no joy. Here is what I currently have:
| Code: |
/etc/shorewall/interfaces
net ppp0 - routefilter,norfc1918,tcpflags
loc eth0 detect tcpflags
wlan wlan0 detect maclist
|
| Code: |
/etc/shorewall/zones
net Net Internet
loc Local Local Networks
wlan Wlan Wireless Lan
|
| Code: |
/etc/shorewall/rules
ACCEPT fw net tcp 53
ACCEPT fw net udp 53
#
# Accept SSH connections from the local network for administration
#
ACCEPT loc fw tcp 22
ACCEPT wlan fw tcp 22
#
# Allow Ping To And From Firewall
#
ACCEPT loc fw icmp 8
ACCEPT wlan fw icmp 8
ACCEPT net fw icmp 8
ACCEPT fw loc icmp
ACCEPT fw wlan icmp
ACCEPT fw net icmp
|
| Code: |
/etc/shorewall/masq
ppp0 eth0
ppp0 wlan0
|
Is there something I'm missing here?
Or how would I then go about defining the wlan0 adapter in shorewall?
 _________________ "Ubuntu" - an African word meaning "Gentoo is too hard for me". |
|
| Back to top |
|
 |
My_World Guru


Joined: 01 Sep 2003 Posts: 339 Location: Kalahari Desert
|
Posted: Wed Nov 23, 2005 9:09 pm Post subject: |
|
|
I have had another look at the Shorewall documantation and reverted back to the default two-interface mode found here:
http://www.shorewall.net/two-interface.htm
My setup now looks almost identical to that one, but the same problem, the wireless lan is not allowed access to and from the internet or the router (cannot ping router, firewall blocks the traffic).
According to the documentation all that I should need is this:
| Quote: |
There are only two changes that need to be made to the Shorewall configuration:
* An entry needs to be added to /etc/shorewall/interfaces for the wireless network interface. If the wireless interface is wlan0, the entry might look like:
#ZONE INTERFACE BROADCAST OPTIONS
loc wlan0 detect maclist
As shown in the above entry, I recommend using the maclist option for the wireless segment. By adding entries for computers 3 and 4 in /etc/shorewall/maclist, you help ensure that your neighbors aren't getting a free ride on your internet connection. Start by omitting that option; when you have everything working, then add the option and configure your /etc/shorewall/maclist file.
* You need to add an entry to the /etc/shorewall/masq file to masquerade traffic from the wireless network to the internet. If your internet interface is eth0 and your wireless interface is wlan0, the entry would be:
#INTERFACE SUBNET ADDRESS
eth0 wlan0
|
I have done this and still no go. Anyone else here wanna take a shot at this problem?
 _________________ "Ubuntu" - an African word meaning "Gentoo is too hard for me". |
|
| Back to top |
|
 |
Tatewaki n00b

Joined: 13 Jun 2005 Posts: 38 Location: Denmark
|
Posted: Sat Jan 07, 2006 3:06 pm Post subject: |
|
|
I got a question about the zones that shorewall uses. I like to block all the traffic from the lan, so i have added this in policy:
| Code: |
net all DROP info
loc all DROP
#
#THE FOLLOWING POLICY MUST BE LAST
all all DROP info
|
but when i do nmap -sV from my laptop i still get thes info:
| Code: |
All 1667 scanned ports on 192.168.1.2 are: filtered
MAC Address: 00:11:D8:03:05:E1 (Asutek computer)
Nmap finished: 1 IP address (1 host up) scanned in 55.377 seconds
|
So i started to read some more about the standalone firewall guid in the shorewall website and then i got confused about the interface part.
| Code: |
#ZONE INTERFACE BROADCAST OPTIONS
net eth0 detect nosmurfs,blacklist,tcpflags,routefilter,logmartians
loc eth1 192.168.1.255 nosmurfs,blacklist,arp_ignore,routefilter
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
|
So like i see it my net is on eth0 and my lan is on eth1, but i use my eth0 to lan too. trying to put it simpel, i only use 1 network card and that is connectet to a switch that then again are connectet to a router. So is my interface part correct or is it something else that is wrong?
(oh yeah i'm using shorewall 3.x) _________________ Do we watch anime to live or do we live to watch anime? |
|
| Back to top |
|
 |
slyyls Tux's lil' helper

Joined: 27 Aug 2004 Posts: 89 Location: Ottawa
|
Posted: Sat Jan 21, 2006 3:14 am Post subject: |
|
|
Hello,
I want to allow local area network traffic to my computer. I have the following rule in my /etc/shorewall/rules file.
| Code: | ACCEPT net:192.168.1.0/24 fw all
|
It works.
Lately, I change my router and now it get the ip 192.168.123.x So for a couple of weeks i kept wondering what was going on and finaly i figured out that my firewall was blocking lan traffic. My question is,
Is there a way to use BASH functions inside the rules file, something like
| Code: | | ifconfig | awk '/192.168./ {print $2}' | sed 's#^.*:##g' | awk 'BEGIN{FS="."}END{print $1 "." $2 "." $3}' |
This way it would automatically get the first 3 digits of my lan ip address.
Also, I got caught once switching from Wireless card to Lan card, during the switch, the firewall was stoped, i guess because there was no NET component on, I didn't notice and spent quite a while trouble shooting VNC afterwards. Is there a small applet or desklet that shows if Shorewall is ON or OFF. That would be very handy, even like a RED/GREEN light icon somewhere.
Thanks,
Sly |
|
| Back to top |
|
 |
Qu4rk n00b


Joined: 22 Mar 2005 Posts: 74
|
Posted: Fri Feb 10, 2006 4:53 pm Post subject: |
|
|
Ok, so I've searched & I guess no one else has encountered this. I can't load yahoo games like chess & what not. Every time I try to click on a game it gives me the "you must be behind a firewall" error msg. So, I stopped shorewall & sure enough the game room opened. Someone in an earlier thread had port 5050 for yahoo msger, but that doesn't work for the games. Anyone know which port to open for Yahoo games?
Thanks |
|
| Back to top |
|
 |
krolden Apprentice


Joined: 28 May 2004 Posts: 293 Location: Belgium
|
Posted: Fri Feb 10, 2006 6:12 pm Post subject: |
|
|
| Have you checked your logs to see what port it wants to connect to? |
|
| Back to top |
|
 |
Qu4rk n00b


Joined: 22 Mar 2005 Posts: 74
|
Posted: Sat Feb 11, 2006 3:06 pm Post subject: |
|
|
| Krolden wrote: | | Have you checked your logs to see what port it wants to connect to? |
Thanks! Yahoo Games port 11999 for all searchers. |
|
| Back to top |
|
 |
Bear The Barbarian n00b

Joined: 17 Feb 2006 Posts: 1
|
Posted: Fri Feb 17, 2006 8:07 am Post subject: |
|
|
I apologize for revisiting a topic that's been hit on before, but I just can't seem to get this to work.
Whenever I try /etc/init.d/shorewall start, I get
| Code: | /etc/init.d/shorewall start
* Starting firewall ...
FATAL: Module ip_tables not found.
iptables v1.3.4: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
ERROR: Command "/sbin/iptables -P INPUT DROP" Failed
FATAL: Module ip6_tables not found.
ip6tables v1.3.4: can't initialize ip6tables table `filter': Module is wrong version
Perhaps ip6tables or your kernel needs to be upgraded.
FATAL: Module ip6_tables not found.
ip6tables v1.3.4: can't initialize ip6tables table `filter': Module is wrong version
Perhaps ip6tables or your kernel needs to be upgraded.
... The error repeats a lot in here, and then ...
iptables v1.3.4: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
/etc/init.d/shorewall: line 14: 26201 Terminated /sbin/shorewall start >/dev/null
|
In terms of the common search:
| Code: | cat /usr/src/linux/.config | grep FILTER
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_NETFILTER_NETLINK is not set
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP6_NF_FILTER=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_PPP_FILTER=y
|
I'm using genkernel. I've checked to make sure that all the options under IP Tables Support were checked (compiled into the kernel, not as modules), and I've even checked everything under IP: Netfilter Configuration submenu just for good measure. Am I just missing an option somewhere? I'm kind of noobish for this, so it could be an incredibly simple mistake. |
|
| Back to top |
|
 |
cherring n00b

Joined: 18 Feb 2006 Posts: 8 Location: Sydney
|
Posted: Sat Feb 18, 2006 2:37 pm Post subject: Shorewall Tutorial |
|
|
I have been putting off installing a firewall on my server as I was intimidated by the process. I always understood the concept, but not the mechanics of it. Luckily for me I had a server that I was just tinkering with, doing a little email serving, but really just learning a lot about running my own server. But as I started to set up all my services and started to get them configured to my liking the need for a firewall was all too apparent to me.
I searched around the net looking for something that could explain iptables to me, but as I didn't understand what it was doing properly I didn't even try to muddle through. Then I stumbled on this tutorial and it explained the whole process brilliantly and I now have a working firewall and I am very happy.
Many thanks for such a well written well documented tutorial that held my hand perfectly every step of the way, I am very grateful to great users such as yourself who pass on their knowledge and understanding of technology to others.
Cheers.  |
|
| Back to top |
|
 |
Old School Apprentice


Joined: 20 Nov 2004 Posts: 230 Location: The Covered Bridge Capital of Oregon
|
Posted: Wed Feb 22, 2006 2:30 am Post subject: |
|
|
I'm getting this error: | Code: | greg@badboy ~ $ sudo /etc/init.d/shorewall start
* Starting firewall ...
ERROR: No ipv4 or ipsec Zones Defined
/etc/init.d/shorewall: line 14: 10420 Terminated /sbin/shorewall st
art >/dev/null [ !! ] |
This is the third box I've installed shorewall on, and have never run into this before.
Any ideas? _________________ I am not young enough to know everything.
- Oscar Wilde |
|
| Back to top |
|
 |
|