Ubuntu Security :: Iptables For Router/proxy?

Apr 1, 2011

Rather than use pfsense, etc I decided to create my own router/proxy etc based on an atom base with 2 nics.Proxy/routing/dns/etc all working fine, I now though want to lockdown the fw rules.ETH1 is the WAN NICETH2 is the LAN NICI'm guessing i want to allow anything out of ETH1, but only allow incoming to ETH1 when its established or related... What about ETH2 though? Any ideas pls? Am used to configuring iptables on single nic, certainly not a router.

Code:
Chain INPUT (policy ACCEPT 18535 packets, 10M bytes)
pkts bytes target prot opt in out source destination

[code]....

View 8 Replies


ADVERTISEMENT

Ubuntu Security :: Iptables Firewall Logs Router?

Apr 5, 2011

In an effort to learn more about firewalls and iptables I have left behind gui set-up tools and have setup a firewall using iptables that logs to its own file. The firewall is as follows:

Code:
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:TCP - [0:0]

[Code]...

View 8 Replies View Related

Server :: Set Up Squid3 Proxy As A Transparent Proxy & Iptables Config

Feb 23, 2011

I am trying to set up my squid3 proxy as a transparent proxy - right now, I have to manually configure browsers to access via proxy. I understand that I have to put some rules into Iptables and also some further directives in the squid.conf.

I have a couple of specific questions. The proxy server is running on a Ubuntu 10.04 workstation and this machine also acts as a dhcp server for the network. I have just one subnet , namely 192.168.0.1-254 There is only 1 network card. Is it much easier to put in a second network card or is it just as easy to configure the existing lan card as a dual IP?

Is it necessary to configure these 2 IP's ( whether they are via 2 lan cards or dual IP on single card ) to be on different subnets. i.e ETH0 192.168.0.1 and ETH1 192.168.1.1 or is ok to have something like ETH0 192.168.0.1 and ETH1 192.168.0.254 ( where ETH0 is the one facing the LAN and ETH1 points to the modem router / switch i.e The Internet ) Where specifically do I save the Iptables rule configuration file and what must I call it ?

View 4 Replies View Related

Networking :: IPTables - Using SSH As Proxy / Socks Server

May 4, 2010

I'd like to use ssh as a proxy/socks server and redirect all connections through this proxy.
It would look like : ssh -D 123 -N host
iptables ...
I've never used iptables before and I did not manage to find any useful for this particular case solutions on the internet.
So, what's the good way to do that ?

View 1 Replies View Related

General :: Transparent Proxy With Squid And Iptables Won't Log IPs From Lan

Aug 23, 2010

I just finished setup a proxy machine that runs in a separate box from gw.

I have the following iptables rule

on squid box

Code:

Code:

Here's an example

Code:

My question is how can i modify the iptables rules so it will forward the real ip's where the requests are originated from.

View 1 Replies View Related

CentOS 5 Networking :: Iptables For Transparent Proxy?

Mar 11, 2010

I have big problem with correct settings of iptables as a router. My network topology (UTM Hardware router) 192.168.1.1--->eth0 192.168.1.2(centos with apache ftp and transparent squid 8080)--->eth1 192.168.0.1(LAN with dhcp)

eth0=WAN 192.168.1.2
eth1=LAN 192.168.0.1

I have problem with hanging connections through squid which are very slow or connection failed. Sometimes i received DNS timeout error from squid stable 2.6 21

[Code]...

View 1 Replies View Related

Ubuntu Servers :: Port Forwarding Setup Using IPTables - Transparent Proxy

May 13, 2010

I'm new to linux, but enjoy using it very much, especially without a GUI, console is fun! I need to set up port forwarding. We have 3 servers, 1x running Ubuntu server 8.04 (used as transparent proxy), 1x server 2003, 1x windows xp.

The linux box has the following ips:
eth0 (internal) 192.168.1.5
eth1 (external) 192.168.0.7

Windows server 2003:
192.168.1.6

Windows XP:
192.168.1.9

Router:
192.168.0.1

The router automatically forwards specific ports to 196.168.0.7 (Linux eth0). From there I want to forward port 8585 to 192.168.1.6 and 3000 to 192.168.1.9. Is there a way that I can do this using iptables?

The commands that I think I'm gonna use look like this:
iptables -A FORWARD -s 192.168.0.0/24 -p tcp --dport 8585 -d 192.168.1.6 -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/24 -p tcp --dport 3000 -d 192.168.1.9 -j ACCEPT

Would this be a correct way of doing it? My biggest problem is that I can't test it without going live, and if I go live and something doesn't work, the entire building will be left without internet, people will hate me. Also, The proxy captures all data on port 80 and forwards it to 3128 so that the proxy can monitor the usage, and a few systems runs fine with it, others however can ping websites, and internet explorer says "website found, waiting for reply" but the webpages cannot be displayed.

View 9 Replies View Related

Networking :: Iptables - Set Up Ip Table And A Transparent Squid Proxy

Nov 10, 2010

I need to set up an ip table and a transparent squid proxy as followed: I have 3 machine: Machine 1 works as a squid proxy. It has 2 interface eth1 and eth2.

eth1: 192.168.99.2 (Connect to eth1 of machine 2)
eth2: 192.168.98.2 (Connect to eth1 of machine 3)

machine 2 works as a webserver
eth1: 192.168.99.4
machine 3 works as a web client.
eth1: 192.168.98.4

my responsibility is to send all tcp traffic from machine 3 at port 80 to my squid proxy. In order to fulfill the tasks, I have edited the squid.conf as followed: Code: http_access allow localnet http_access allow localhost and in machine 1, I tried 2 ip tables command: Code: iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j DNAT --to 192.168.99.2:80 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 80 I don't know if it is right or wrong.

View 7 Replies View Related

Networking :: Iptables Or Reverse Proxy For Oracle Database?

Feb 15, 2010

I'm trying to access my oracle database (port 1521) from the outside.What I have:Outside -----> Proxy ----> DatabaseWhat I try is to configure a reverse proxy or iptables for accepting connections on port 1521 and transfer them to database. Only one computer of the outside will have access to the database.I suppose than this can be done with iptables or another way.In the real environment proxy will have two nicut for test purposes my computer will have only one (for test purposes, the tree computer will be in the same net)

View 11 Replies View Related

Networking :: Squid And IPTABLES - Transparent Proxy Doesn't Work

Jan 12, 2011

I setup squid with transparent proxy and its working, however, when I reboot the server, the proxy server doesnt work unless I run the following.

Code: # squid server IP
SQUID_SERVER="192.168.1.1"
# Interface connected to Internet
INTERNET="eth0"
# Interface connected to LAN
LAN_IN="eth1"
# Squid port
SQUID_PORT="3128"
[Code]...

View 6 Replies View Related

Networking :: Fedora Iptables Forward Port80 To Other Proxy Server?

May 20, 2009

I'm using Fedora Core5.0 I have using Iptables for forward port 80 to port 3128(Squid) in the same of server.I need to forward using Iptables to use the other proxy server because this server i am use for vpn and mail tranfer.What a Commnand for i use?ase 1. Server 1 >Ip 192.168.0.4 SQUID WITH PORT(3128)2. Server 2 IP 192.168.0.254 PF SENSE (3128) I will use server 2 for using internet connect only.

View 1 Replies View Related

Ubuntu Security :: Router - Port Forwarding And Network Security

Nov 11, 2010

As it stands I have a small home network operating behind my modem/router. Some of the ports on this are forwarded to my PS3 for gaming but I was looking at forward some for my file server.

At the moment I've forwarded port xxx22 to port 22 on my server for SSH for instance. ANd similarly 21 for FTP (although it doesnt seem to want to connect for any more than a few seconds using that). What I was thinking of doing was placing a small website for a handful of ppl to use on the server too and port forward again - xxx80 to 80. It works just fine but I'm a little concerned on the security front.

As I've moved the port to something different from the outside world I'm presuming I will have already cut the potential for malicious folks to wander in but is there anything else I should be doing? At the moment there's no firewall operating on the server, usually as its hidden behind the modem/router. But if I open this thign up more permanently what should I be doing? I've read a few articles on it but I'm always left with the overwhelming thought of "Thats if theres no firewall in my router" as they just seem to do the same.

View 5 Replies View Related

Networking :: IPTables - Redirecting Web Traffic To Single Transparent Proxy Server

Mar 25, 2010

I am new to iptables. We have two Squid proxy servers running in "non-transparent mode" (172.16.0.1 and 172.16.0.2). Currently users have to configure the proxy server they want to use by configuring them in their browsers. Recently I saw an example for redirecting web traffic to a single transparent proxy server.

-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 3128

Can anyone modify this rule to accommodate my current setup of two proxy servers running in non-transparent mode. i.e Redirect web traffic to the 172.16.0.1-172.16.0.2 ip range.

View 2 Replies View Related

Fedora Networking :: Transparent Proxy With A Home Router?

Mar 8, 2010

I have set up many Dansguardian/Squid proxy servers. All of them have been on a network where I could use Microsoft Group Policies to force the proxy settings on each machine. The entire setup is quite easy, surprisingly robust, and reliable as hell.

My Dentist talked to me today and asked for something different. He wants to set his office up as a wireless hot spot for his patrons, and he wants their surfing directed through a proxy server. I plan on putting them on a completely different subnet and independent router. Now, since I won't have the convenience of GP I'm wondering if there is a way to force all internal Port 80 traffic through the Proxy server but obviously not the Proxy itself. I would like to use the router to do this and not the Linux box. Is there a low cost home router like Linksys or Netgear that will do this?

View 2 Replies View Related

Networking :: Iptables - Forwarding On Router Doesn't Appear To Be Working

Sep 12, 2009

For the background, I'll be using my router as a firewall with snort-inline enabled. I got 3 NIC's: one for the WAN, the second will be bridged to the WAN NIC for queuing traffic which snort-inline requires, and the third is the LAN NIC (the computer I use for everyday work). Here's how I have my interfaces set up:

Code:

# /etc/network/interfaces
# Loopback interface
auto lo
iface lo inet loopback

[code]....

From what I understand, queuing needs to be set up on the bridge. From the documentation I've read it's done like this:

Code:

iptables -A INPUT -j QUEUE
And then to forward traffic, I did:

Code:

iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE

I've done this and am able to ping the router, obtain a DNS address from dnsmasq from the LAN computer. From the router I am able to connect to the internet (ping, links <address>...). From the LAN computer trafficking isn't getting forwarded, Firefox, links, ping all don't resolve.

View 7 Replies View Related

Networking :: Squid With Iptables - Make Clients To Browse Internet Only From Proxy Server?

Jun 14, 2010

i have the following ip assignments

fedora (iptables)
eth0 -private :192.168.1.1
eth1 -public : 186.117.50.6
squid proxy
192.168.1.10:3128
my clients range
192.168.2.0/24

how can i make my clients to browse internet only from proxy server my network is NAT 'ed. Please specify a iptable rule to allow internet access for my clients to browse ONLY if they come through proxy server.

View 1 Replies View Related

Software :: Installing/Configuring A Proxy Server On A Linksys Router?

Mar 18, 2009

I have been happily running the (always latest) version of PolarCloud's Tomato software on my LinkSys WRT54G for about 2 years now. I am looking for a way to setup a Proxy Server on my Tomato-based router to use from a remote machine somewhere in the web cloud.The reason for wanting to set this up follows. I normally run Squid on a Ubuntu 8.04 box, which I use while I am away from my LAN at home to browse the net (I like to keep things between me and my ISP, as much as possible . I rely on my proxy server on a daily basis. The way it works is I SSH into my Ubuntu box, and forward squid ports. I then point my browser to the proxy on my box. For various reason, however, I would like to set it up so that I can also do this via my router. So, I would like to be able to ssh to my router (I can already do this), forward the proxy ports, and surf the nets happily via my router at home. I am happy to use existing solutions (if possible), such as privoxy or squid, and am also open to setting up a custom-based solution, as may be necessary.

View 1 Replies View Related

Networking :: Most Common Method To Route Network Traffic As A Router/proxy

Apr 22, 2011

I am using Debian 5 and I have some networking experience, however I want to learn to do this the best way possible. I have a Debian box with two nics and I want to connect that to a switch and use my Debian box as a router basically, as well as having a firewall setup within that too.

Should I use iptables to set up nat or the route command or what? I just want to know the group of tools to use in order to set up my network. Network diagram: Internet <------> Debian Box <----> switch <----> hosts I found some guides but they are for linux 2.4 and i'm not sure if they are right.

View 1 Replies View Related

Networking :: Setting Up Squid Proxy To Virtual Linux Soho Router?

Mar 31, 2011

i must make this work with the use of virtual pc's. I have vm player and installed fedora ( the latest version ) and one xp . So i have 2 virtual pc's. I'm making it simple for start so i can add more pc's when i see that it is working. I have setup a dhcp server at the fedora virtual pc. The fedora virtual pc is like a soho router. The xp pc is getting ip from dhcp while the fedora one has a static one.

My pc is behind an adsl router. Both virtual pc's can see each other which means i have no connectivity issues.Im trying to setup a squid proxy ( transparent one ) so for example the xp pc can access porn sites and such. I used all required configuration for the squid to work and started the service. Ive also inserted with iptables the commands to forward all incoming port 80 packets to port 3128 ( the squid ). It doesnt seems to be working and i thik i know why but i dont know how to fix it.

Because the xp has a gateway at 192.168.1.1 ( the adsl router ) packets go directly to it and not to the soho router ( fedora virtual pc as i intend to do) What can i do to solve this problem ? How can i forward all packets to go to the fedora virtual pc first and then the fedora pc to forward them (if necessary) to the adsl router? PS. I used Bridged connection on the networking configutration on the vmware player ! If you also want i can post the code for squid or iptables if needed !

View 1 Replies View Related

Server :: Bridged Router / Modem Setup - Squid Transparent Proxy

May 19, 2010

I'm using a Debian box as a gateway. I'm planning on bridging my DLink 604T modem/router so that traffic on the LAN goes to my gateway (which only has one NIC). The Debian box is running a PPPoe application which I'm hoping to log into the ISP through the DLink. I plan to configure the box as a squid transparent proxy. Most Howtos I've seen use NAT with 2 NICs, eth0 for the LAN and eth1 for the Internet. Any step-through to set up NAT for this?

View 4 Replies View Related

Ubuntu Security :: Do I Really Need Router For Security?

Oct 5, 2010

I've read that using your computer behind a router is a must for security because of the NAT+SPI firewall so naturally I became interested in getting one. The thing is, I don't need the other features routers have because I don't do wireless, & I only use one computer. So do I really need one? Do the security benefit(s) gained from using a router warrant spending $50+?? Wouldn't using UFW with default deny rule offer the same level of protection?

Also I want to use my Playstation3 online. What security risks will I be taking if I connect it straight to my modem, instead of through a router?

View 9 Replies View Related

Ubuntu Security :: Tor Be Used With Network Proxy?

Mar 5, 2011

When i click preferences-network proxy a screen of comes up showing the system internet configuration. Is there a way to make all system connections got through tor?

View 5 Replies View Related

Ubuntu Security :: How To Reset The Iptables

Jan 14, 2010

i ran this

Code:

iptables -N rate-limit
iptables -A rate-limit -p tcp -m conntrack --ctstate NEW -m limit --limit 3/min --limit-burst 3 -j RETURN
iptables -A rate-limit -j DROP
iptables -I INPUT 1 -p tcp --dport 22 -j rate-limit

i am no longer able to ssh in to the machine , how can i reset iptables and firestarted back to default?

View 3 Replies View Related

Ubuntu Security :: Use Address Not Ip In Iptables?

Jul 24, 2010

i need to open this address ftp.nai.com, is there a way to use address not ip in iptables?

View 7 Replies View Related

Ubuntu Security :: Iptables Configured By UFW ?

Sep 17, 2010

I've recently moved from Firestarter to UFW/GUFW, and I wonder if someone could confirm if my iptables configuration is secure.

When I enter sudo iptables -L i get:

Code:

View 3 Replies View Related

Ubuntu Security :: Iptables Allow Via Spesific NIC?

Dec 29, 2010

eth1 has connection to the net via gateway ..eth0 on the same machine has users on a intranet and needs access to the internet, i need to allow internet connection and prevent packets which logically originate from the internet getting into the intranet

View 1 Replies View Related

Ubuntu Security :: How To Clear Iptables

Apr 21, 2011

Installing a router, and I need to completely "wipe" iptables (flush I mean) on both computers, and I think I run ufw/gufw on both, so that would need to be uninstalled. The router is very secure, has NAT, etc, etc, and I'd rather setup all that side of things in one point, rather than on each computer.

View 2 Replies View Related

Ubuntu Security :: Both Ufw And Iptables Running Together?

May 23, 2011

Can I have both ufw and iptables running together? My server is currently using ufw, if I add an iptables rule will it have any effect?

View 6 Replies View Related

Ubuntu Security :: Only Allowed To Use One Port For Proxy?

Jun 5, 2010

I'm using a local proxy server VPN'd to another network.

How do I setup either Firestarter or Gufw/ufw to ONLY allow in/out from ONE port? (The one port the proxy uses)

Ex: Firefox is proxied to 127.0.0.1, all ports, and then the proxy picks it up, and sends out on port xxxx, and recieves on port xxxx, then sends back thru 127.0.0.1, back to Firefox.

Any setting/rules I've treid on either Firestarter or Gufw kills the proxy>VPN (Proxy won't connect to remote network)

Addendum: If I start the proxy FIRST, then the firewall, all is good. I'm thinking the proxy uses a port to connect with remote network first, then switches to my configured xxxx port...hmmm

View 1 Replies View Related

Ubuntu Security :: Install Proxy On Kubuntu 10.10?

Jan 10, 2011

I am trying to install a proxy on my Kubuntu 10.10, since I live in a country that blocks access to almost everything. I tried to install squid, anon, socks.. both with command-line and KPackageKit, but every time, I have this error message:

[code]...

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved