SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all, i'm using alienbobs firewall (firewall-generator) and I have an internal lan camera (ip-cam) i want to view through browser....the cam doesn't need to access to my external device. I just want access it through a browser, no nat needed.
ppp0 is my external device (net)
wlan0 is my link to my ip-cam
192.168.0.0/24
I just need to be able access it, anyone help?
With alienbobs firewall generator it uses nat for the second device, so wondered if a couple of rules added to the firewall script would do.
Eric's firewall generator is very good, but I tend to view it as a little bit of overkill for a simple workstation setup.
This is what I use on my workstation.
/etc/rc.d/rc.firewall:
Code:
#!/bin/sh
IPT='/usr/sbin/iptables'
MODPROBE="/sbin/modprobe"
########################################################################
# Load FTP connection tracking helper modules
# (needed for proper operation of ftp client connections)
$MODPROBE nf_conntrack
$MODPROBE nf_conntrack_ftp
########################################################################
# Set default policies for packets that get to the end of a chain
# without matching a rule.
# DROP packets on reaching end of INPUT, FORWARD and OUTPUT chain
# (a.k.a "Better safe than sorry" mode)
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
$IPT -P OUTPUT DROP
# These next ones aren't strictly necessary as we're not using these
# chains, but setting them to a known state is never a bad idea.
$IPT -t nat -P PREROUTING ACCEPT
$IPT -t nat -P POSTROUTING ACCEPT
$IPT -t nat -P OUTPUT ACCEPT
$IPT -t mangle -P PREROUTING ACCEPT
$IPT -t mangle -P INPUT ACCEPT
$IPT -t mangle -P FORWARD ACCEPT
$IPT -t mangle -P OUTPUT ACCEPT
$IPT -t mangle -P POSTROUTING ACCEPT
# $IPT -t raw -P PREROUTING ACCEPT
# $IPT -t raw -P OUTPUT ACCEPT
########################################################################
# Flush any existing rules and chains
#
$IPT -F
$IPT -F -t nat
$IPT -F -t mangle
# $IPT -F -t raw
$IPT -X
$IPT -X -t nat
$IPT -X -t mangle
# $IPT -X -t raw
########################################################################
########################################################################
# Now insert our own ruleset
#
# INPUT CHAIN
$IPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPT -A INPUT -i lo -j ACCEPT
# Example of opening up ports to new incoming connections
# $IPT -A INPUT -p tcp -i eth0 -m multiport --dports 21,22,25,80,443 \
# --syn -m state --state NEW -j ACCEPT
# OUTPUT CHAIN
$IPT -A OUTPUT -j ACCEPT
########################################################################
It doesn't block any outgoing connections, only incoming ones but that should be sufficient for a standalone/workstation type of machine.
I can't say 100% for sure without knowing more about your LAN, but I'm guessing you probably have a wireless router and have it set up to prevent machines on your WLAN from talking directly to each other. In other words, you may not be having an iptables issue on your client machine at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.