Lab Environment:
server ——firewall——client
server ip address: 192.168.1.100
client ip address: 192.168.1.200
firewall ip address :192.168.1.1
Requirements:
Only allow servers to pass through the network neighborhood The file is transferred to the client (this process is one-way), the server and the client can mutually confirm each other through the icmp echo request (this process is two-way) //This article is transferred from www.45it.com computer software and hardware application network
Steps:
1. Bind a network card to a bridge interface (
The firewall must have at least two network cards, then Bind them together, the firewall can be bridged, first need to install the bridge-utils and bridge-utils-devel two components, these two components will bind eth0 and eth1 into a bridge device, in line with our requirements . My environment is rhcl 4.4 fake settings, these two components are available on the CD
#rpm-ivh bridge-util-×
Then bind eth0 and eth1 to bri0 Interface
#ifconfig eth0 0.0.0.0
#ifconfig eth1 0.0.0.0
#brctl addbr bri0
#brctl addif bri0 eth0
#brctl addif bri1 eth1
Use brctl show to confirm:
#brctl show
birdge name bridge id STP enable interface
bri0 8000.000347305b3 no eth0
eth1
Here's the problem
Here, since the bri0 interface has been established Now, is it written to the ip address above? The answer is yes,
With the ip address we can do remote control, there are two ways to set up, one is manually written, the second is obtained by dhcp server
Manually written:
#ifconfig bri0 192.168.1.1 netmask 255.255.255.0 up
dhcp client
# dhclient bri0
The above can write shell scripts, each time the boot automatically executes, I use rhel 4.4 in /etc/rc.local
2. Set firewall forwarding function
#vi /etc/systcl.conf
#Controls ip packet forwarding
net.ipv4.ip_forwarding = 1
#sysctl -p
Can test, the current server and client network connection xing
3. Set the strategy
As for the strategy is to play iptables, the basic part I will not believe Everyone understands that it is deeper than me, because today is a day of rest and the handwriting is sour.
Go to the topic:
For security reasons, first set the forward default policy to drop and only release the smb protocol and icmp ech0 request
# iptables -P FORWARD DROP
At this time, the server and client are currently not connected.
Setting allows n packets to pass:
# iptables —A FORWARD -m state -state RELATED,ESTABLISHED -j ACCPT
Allow icmp ech0 request:
#iptables -A -FORWARD -s 192.168.1.0/24 -p icmp -icmp-type 8 - j ACCPT
Set only server to send files to client via Network Neighborhood
#iptables -A FORWARD -s 192.168.1.100/24 -d 192.168.1.200/24 -p tcp -dport 139 -j ACCPT
#iptables -A FORWARD -s 192.168.1.100,24 -d 192.168.1.200/24 -p tcp -dport 445 -j
ACCPT
This is OK.
STM32 The storage medium corresponding to the three boot modes is the three boot modes corresponding
A few days ago, I met a friend on QQ and asked for help. I said that the VPS I bought could not sta
>> load heart_scale error using the loadASCII file The number of columns in the third row of h
First, temporarily enable the network card and configure the IP: # ifconfig -a /* View all network a
How to use static library and shared library on Linux platform
PCI ROOT HID fail=0x5 ACPI Linux error general solution
Linux Resource Limitations and Open Techniques
Linux uses Wireshark for packet capture analysis (including SIP and RTP packets)
Source code reading tool under Windows platform Source Insight
Introduction to Linux File System Directory Structure
Linux large file splitting split command
Executing commands in Linux; the difference between &&
Discussion on GUEST OS Clock (TIMEKEEP) in Virtual Machine
How to make the Linux host open pseudo-static
Oracle, informix database environment variable settings and compile
Qiao Beifeng said: Win10 Mobile will add more new features.
What should I do if the Win10 preview system is automatically restarted?
More than ten simple optimizations worth doing after installing Windows 8
How to hide the taskbar in Win7 system to make the desktop more tidy
Targeted Windows 7 system service cleaning solution
Windows 10 Preview App Store Beta Quietly Updated Added Event Tiles
Several solutions for Windows memory error