V
V
varchunnix2018-11-09 11:59:28
Debian
varchunnix, 2018-11-09 11:59:28

How to set up interfaces on the server, as well as iptables for a transparent proxy that is behind the router?

Good afternoon, I have such a task, I need to set up a transparent proxy based on debian 9.5. This proxy server will be located in the internal behind the router, on my server there are 2 network interfaces of the interface, I can’t quite understand how I can configure the interfaces, as well as iptables for my proxy server. And is it possible when finding all devices, including proxy servers, on the same network 192.168.1.0/24.
PS I'm a newbie, please don't kick me strong. And thanks for the help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2018-11-09
@varchunnix

To configure the firewall, I recommend using the firehol package - firehol.org Config
example /etc/firehol/firehol.conf (eth0 - looks inward, eth1 - outward)

interface eth0 mylan
    policy accept

interface eth1 internet
    server smtp accept
    server http accept
    server ssh  accept
    client all  accept

router mylan2internet inface eth0 outface eth1
    masquerade
    route all accept

It will not work to redirect requests to an internal proxy, either put it in the DMZ (and connect another card or make a VLAN), or put a proxy on the server itself. On the other hand, I don’t understand why it is needed in the modern world! Enough masquerading, as in the example.
Interfaces are configured in the /etc/network/interfaces file, but if you installed it with a graphical shell, then configure it through it, or remove the NetworkManager package. - https://wiki.debian.org/en/NetworkConfiguration
auto eth0
iface eth0 inet static
   address 192.168.1.254/24

auto eth1
iface eth1 inet dhcp

#iface eth1 inet static
#   address 1.2.3.4/28
#   gateway 1.2.3.5
#   dns-nameservers 8.8.4.4 8.8.8.8

C
cssman, 2018-11-09
@cssman

Your question sounds like an assignment.
In order to deal with the task, you need to:
1) draw a diagram
2) see what services you use and will be terminated on a proxy
3) google proxy settings guides and iptables rules for services
0) if you don’t understand how the network and services work, read articles on networks for the little ones

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question