<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Network &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/category/knowledge_base/network/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Sun, 07 Jun 2020 21:23:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Shared LVM iSCSI Server and Client configuration for CentOS</title>
		<link>https://www.veriteknik.net.tr/en/shared-lvm-iscsi-server-and-client-configuration-for-centos/</link>
					<comments>https://www.veriteknik.net.tr/en/shared-lvm-iscsi-server-and-client-configuration-for-centos/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Sun, 07 Jun 2020 21:23:27 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=1126</guid>

					<description><![CDATA[<p>Target: (Server with storage): 10.10.10.2/24Client: 10.10.10.1/24 Target: Install iSCSI Utils if not available Edit targets.conf Paste the configuration below, change target name based on your needs Enable tgtd service Start the service Note: If you don&#8217;t want any volume group to be automatically recognized by the operating system of the target, please filter the volume [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/shared-lvm-iscsi-server-and-client-configuration-for-centos/">Shared LVM iSCSI Server and Client configuration for CentOS</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Target: (Server with storage): 10.10.10.2/24<br />Client: 10.10.10.1/24</p>
<p><strong>Target:</strong></p>
<p>Install iSCSI Utils if not available</p>


<pre class="wp-block-code"><code></code></pre>



<p>Edit targets.conf</p>



<pre class="wp-block-code"><code>vi /etc/tgt/targets.conf</code></pre>



<p>Paste the configuration below, change target name based on your needs</p>



<pre class="wp-block-code"><code>backing-store /dev/sdc1 
initiator-address 172.100.100.2 
# add more initiators if you need 
#initiator-address 172.50.50.2 
#incominguser username password</code></pre>



<p>Enable tgtd service</p>



<pre class="wp-block-code"><code>chkconfig tgtd on</code></pre>



<p>Start the service</p>



<pre class="wp-block-code"><code>service tgtd start</code></pre>



<p>Note: If you don&#8217;t want any volume group to be automatically recognized by the operating system of the target, please filter the volume group to be seen on boot.<br>Edit /etc/lvm/lvm.conf and add this global_filter</p>



<pre class="wp-block-code"><code>global_filter = &#91; "a|^/dev/sdc1$|", "r/.*/" ]</code></pre>



<p></p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/shared-lvm-iscsi-server-and-client-configuration-for-centos/">Shared LVM iSCSI Server and Client configuration for CentOS</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/shared-lvm-iscsi-server-and-client-configuration-for-centos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1126</post-id>	</item>
		<item>
		<title>How to add reverse DNS delegation for RIPE</title>
		<link>https://www.veriteknik.net.tr/en/how-to-add-reverse-dns-delegation-for-ripe/</link>
					<comments>https://www.veriteknik.net.tr/en/how-to-add-reverse-dns-delegation-for-ripe/#respond</comments>
		
		<dc:creator><![CDATA[Tunc Yıldırım]]></dc:creator>
		<pubDate>Wed, 18 Sep 2019 20:51:47 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[rdns]]></category>
		<category><![CDATA[ripe]]></category>
		<guid isPermaLink="false">https://www.veriteknik.net.tr/?p=4351</guid>

					<description><![CDATA[<p>Let&#8217;s say we want to add reverse DNS delegation for the IP block 123.234.12.0/24 The first step of the configuration is on the nameserver, BIND on our case. Create the relevant reverse DNS file on /var/named/rev and then edit the file: cd /var/named/rev touch 123.234.12 vim 123.234.12 The file contents should be like the following: [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-add-reverse-dns-delegation-for-ripe/">How to add reverse DNS delegation for RIPE</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Let&#8217;s say we want to add reverse DNS delegation for the IP block 123.234.12.0/24</p>
<p>The first step of the configuration is on the nameserver, BIND on our case.</p>
<p>Create the relevant reverse DNS file on /var/named/rev and then edit the file:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">cd /var/named/rev
touch 123.234.12
vim 123.234.12</pre>
<p>The file contents should be like the following:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">$TTL 3D
@       IN      SOA     ns1.rackdc.com. postmaster.rackdc.com. (
                        2018112201   ; Serial, todays date + todays serial
                        8H      ; Refresh
                        2H      ; Retry
                        4W      ; Expire
                        1D)     ; Minimum TTL
                                ; Created on http://root0.net 2005-10-27
                 NS             ns1.rackdc.com.
                 NS		ns2.rackdc.com.
                 
$ORIGIN 12.234.123.in-addr.arpa.


12		PTR		rackdc.com.
</pre>
<p>After configuring this file with correct details, edit the file /etc/named.conf to include the file you&#8217;ve just created.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">vim /etc/named.conf</pre>
<p>Add the following line in the file:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">zone "12.234.123.in-addr.arpa" { notify yes; type master; file "/var/named/rev/123.234.12";allow-query { any; };};</pre>
<p>Finally, restart the DNS service.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">service named restart</pre>
<p>It is important to complete this step before creating an object in RIPE.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/how-to-add-reverse-dns-delegation-for-ripe/">How to add reverse DNS delegation for RIPE</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/how-to-add-reverse-dns-delegation-for-ripe/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4351</post-id>	</item>
		<item>
		<title>Finally Cisco Routers to have a packet capture mechanism</title>
		<link>https://www.veriteknik.net.tr/en/finally-cisco-routers-to-have-a-packet-capture-mechanism/</link>
					<comments>https://www.veriteknik.net.tr/en/finally-cisco-routers-to-have-a-packet-capture-mechanism/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Sat, 26 Dec 2015 11:17:49 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=1043</guid>

					<description><![CDATA[<p>Before iOS revision 12.4 you were having access-lists and debug facility to get a clue about the packets passing through an interface. Now it is fairly easy to get packets and even export them as .pcap to analyse within a few easy steps. First thing to do is, create an access-list based on your requirements: [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/finally-cisco-routers-to-have-a-packet-capture-mechanism/">Finally Cisco Routers to have a packet capture mechanism</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Before iOS revision 12.4 you were having access-lists and debug facility to get a clue about the packets passing through an interface. Now it is fairly easy to get packets and even export them as .pcap to analyse within a few easy steps.</p>
<p>First thing to do is, create an access-list based on your requirements:</p>
<pre class="brush: bash; gutter: true; first-line: 1">conf t
ip access-list extended HTTP_TEST
	permit tcp any any eq www
end
</pre>
<p>Now on the enable mode &#8220;type en&#8221; type the following to create your capture related to the access-list you created</p>
<pre class="brush: bash; gutter: true; first-line: 1">monitor capture buffer HTTP_BUFFER
monitor capture buffer HTTP_BUFFER filter access-list HTTP_TEST</pre>
<p>Select the desired interface you want your capture to collect packets</p>
<pre class="brush: bash; gutter: true; first-line: 1">monitor capture point ip cef HTTP_POINT GigabitEthernet0/2 both</pre>
<p>Now start collecting packets</p>
<pre class="brush: actionscript3; gutter: true; first-line: 1">monitor capture point associate HTTP_POINT HTTP_BUFFER

monitor capture point start HTTP_POINT</pre>
<p>Type &#8220;sh monitor capture buffer all parameters&#8221; to get if a packet collected or not</p>
<pre class="brush: bash; gutter: true; first-line: 1">Capture buffer HTTP_BUFFER (linear buffer)
Buffer Size : 1048576 bytes, Max Element Size : 68 bytes, Packets : 5
Allow-nth-pak : 0, Duration : 0 (seconds), Max packets : 0, pps : 0
Associated Capture Points:
Name : HTTP_POINT, Status : Inactive
Configuration:
monitor capture buffer HTTP_BUFFER 
monitor capture point associate HTTP_POINT HTTP_BUFFER
monitor capture buffer HTTP_BUFFER filter access-list HTTP_TEST</pre>
<p>don&#8217;t forget to stop the capture with the command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">monitor capture point stop HTTP_POINT</pre>
<p>to export the packets type the following and don&#8217;t forget to delete the capture buffer, install a tftp server to your client and change the IP below to your client&#8217;s IP address.</p>
<pre class="brush: bash; gutter: true; first-line: 1">monitor capture buffer HTTP_BUFFER export tftp://192.168.1.2/HTTP.pcap
!and delete the capture buffer
no monitor capture buffer HTTP_BUFFER</pre>
<p>and as a summary of the commands all together:</p>
<pre class="brush: bash; gutter: true; first-line: 1">conf t
ip access-list extended HTTP_TEST
	permit tcp any any eq http
end

monitor capture buffer HTTP_BUFFER
monitor capture buffer HTTP_BUFFER filter access-list HTTP_TEST


monitor capture point ip cef HTTP_POINT GigabitEthernet0/2 both

monitor capture point associate HTTP_POINT HTTP_BUFFER

monitor capture point start HTTP_POINT

sh monitor capture buffer all parameters

monitor capture point stop HTTP_POINT

monitor capture buffer HTTP_BUFFER export tftp://192.168.1.2/HTTP2.pcap

no monitor capture buffer HTTP_BUFFER

show monitor capture buffer HTTP_BUFFER dump</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/finally-cisco-routers-to-have-a-packet-capture-mechanism/">Finally Cisco Routers to have a packet capture mechanism</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/finally-cisco-routers-to-have-a-packet-capture-mechanism/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1043</post-id>	</item>
		<item>
		<title>CentOS 7 Firewall Sheet</title>
		<link>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/</link>
					<comments>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Tue, 12 May 2015 10:33:50 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=997</guid>

					<description><![CDATA[<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall. To check the active zones: [root@rh7 ~]# firewall-cmd --get-active-zones public interfaces: enp1s0f0 To get available service names: [root@rh7 ~]# firewall-cmd --get-services RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/">CentOS 7 Firewall Sheet</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The best thing about CentOS 7 is, it has a super easy firewall built-in. I recommend you not to disable the firewall.</p>
<p>To check the active zones:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --get-active-zones
public
  interfaces: enp1s0f0</pre>
<p>To get available service names:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --get-services
RH-Satellite-6 amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https</pre>
<p>If the service you want to enable listed with the command above, you don&#8217;t have to write explicit port number, to allow a service permanently:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --add-service=https --permanent
success</pre>
<p>If the desired service is not available such as POP3 use the following command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --add-port=110/tcp --permanent
success</pre>
<p>When you finish adding/removing rules, apply them with the command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --reload
success</pre>
<p>To check the services enabled on the zone public:</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@rh7 ~]# firewall-cmd --zone=public --list-all
public (default, active)
  interfaces: enp1s0f0
  sources: 
  services: dhcpv6-client http https imaps pop3s smtp ssh
  ports: 7071/tcp 110/tcp
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules:</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/">CentOS 7 Firewall Sheet</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/centos-7-firewall-sheet/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">997</post-id>	</item>
		<item>
		<title>SIP NAT on Cisco IOS stop working</title>
		<link>https://www.veriteknik.net.tr/en/sip-nat-cisco-ios-stop-working/</link>
					<comments>https://www.veriteknik.net.tr/en/sip-nat-cisco-ios-stop-working/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Wed, 23 Apr 2014 21:54:41 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[5060]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[SIP]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=953</guid>

					<description><![CDATA[<p>Suddenly you realized that external SIP phones stop working without any reason, you should be avare of Cisco routers get stuck sometimes. There is a trick to solve the issue with two commands, but first of all be sure that the sip is not registered through arterisk cli: Type on your asterisk: asterisk -rvvvvv and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/sip-nat-cisco-ios-stop-working/">SIP NAT on Cisco IOS stop working</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Suddenly you realized that external SIP phones stop working without any reason, you should be avare of Cisco routers get stuck sometimes.<br />
There is a trick to solve the issue with two commands, but first of all be sure that the sip is not registered through arterisk cli:</p>
<p>Type on your asterisk:</p>
<pre class="brush: shell; gutter: true; first-line: 1">asterisk -rvvvvv</pre>
<p>and check sip peers:</p>
<pre class="brush: shell; gutter: true; first-line: 1">sip show peers</pre>
<p>Now you should see the extension as UNKNOWN, if this is the case for you apply these steps on your Cisco IOS:</p>
<pre class="brush: shell; gutter: true; first-line: 1">
conf t
no ip nat service sip udp port 5060
exit
clear ip nat translation
</pre>
<p>To see the results, simply type:</p>
<pre class="brush: shell; gutter: true; first-line: 1">
sh ip nat translations
</pre>
<p>Have fun!</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/sip-nat-cisco-ios-stop-working/">SIP NAT on Cisco IOS stop working</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/sip-nat-cisco-ios-stop-working/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">953</post-id>	</item>
		<item>
		<title>Add Multiple Gateways to Multiple NICs on Ubuntu Server</title>
		<link>https://www.veriteknik.net.tr/en/add-multiple-gateways-multiple-nics-ubuntu-server/</link>
					<comments>https://www.veriteknik.net.tr/en/add-multiple-gateways-multiple-nics-ubuntu-server/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 11 Dec 2013 10:46:32 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=924</guid>

					<description><![CDATA[<p>Even though this seems an easy task, when you add IP&#8217;s with different gateways, you have to route the IP&#8217;s for the correct gateways. Let&#8217;s say you have two networks, 192.168.80.128/25 192.168.90.128/25 This means your gateways are 192.168.80.129, 192.168.90.129 and you have these IP addresses respectively : 192.168.80.130-254, 192.168.90.130-254 Lets assign the 192.168.80.x IP&#8217;s to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/add-multiple-gateways-multiple-nics-ubuntu-server/">Add Multiple Gateways to Multiple NICs on Ubuntu Server</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Even though this seems an easy task, when you add IP&#8217;s with different gateways, you have to route the IP&#8217;s for the correct gateways.</p>
<p>Let&#8217;s say you have two networks,<br />
192.168.80.128/25<br />
192.168.90.128/25</p>
<p>This means your gateways are 192.168.80.129, 192.168.90.129 and you have these IP addresses respectively : 192.168.80.130-254, 192.168.90.130-254</p>
<p>Lets assign the 192.168.80.x IP&#8217;s to eth0 and 90.x to eth1.<br />
Then we&#8217;ll have to edit our <strong>/etc/network/interfaces</strong> file accordingly:</p>
<pre class="brush: text; gutter: true; first-line: 1">auto lo
iface lo inet loopback

auto eth0 eth0:1 eth1 eth1:1

iface eth0 inet static
    address 192.168.80.130
    netmask 255.255.255.128
    gateway 192.168.80.129

iface eth0:1 inet static
    address 192.168.80.131
    netmask 255.255.255.128

iface eth1 inet static
    address 192.168.90.130
    netmask 255.255.255.128

iface eth1:1 inet static
    address 192.168.90.131
    netmask 255.255.255.128

post-up ip route add default via 192.168.90.129 dev eth1 table 101</pre>
<p>As you can see, we did not specify any gateways for other devices than eth0. This is because, we will route the 192.168.90.x IP addresses through 192.168.90.129 but the system will not know it as a default gateway. That&#8217;s why we added the last line to interfaces, we tell to route 192.168.90.129 using table 101. Well, you&#8217;ll say <em>&#8220;We haven&#8217;t defined that table yet, what&#8217;s this 101?&#8221;</em>, that&#8217;s true, normally you have to define it in your shell, but we&#8217;ll add it to our rc.local so that it will be there all the time (after a reboot).</p>
<p>In order to achieve this, we add the following line to <strong>/etc/rc.local</strong> (add it before the &#8220;exit 0&#8221;)</p>
<pre class="brush: text; gutter: true; first-line: 1">ip rule add from 192.168.90.128/25 lookup 101</pre>
<p>Now write the ip rule to your shell too (so you won&#8217;t need a reboot) then restart your networking service.</p>
<pre class="brush: bash; gutter: true; first-line: 1">/etc/init.d/networking stop &amp;&amp; /etc/init.d/networking start</pre>
<p>Here you go, <strong>route -n</strong> will show you only one gateway, yet you&#8217;ll be able to use both IP classes on both devices. So technically we did not add two gateways, but we&#8217;re using both of them.</p>
<p>Don&#8217;t forget that we only added 4 IP&#8217;s here, if you want to add all of them in the block, you better write a script to generate it.</p>
<p>Ok you don&#8217;t have to cry about it, below is a Python script I wrote for you, edit it accordingly 🙂</p>
<pre class="brush: python; gutter: true; first-line: 1">#/usr/bin/python

#ip generator script - plugged.in

IP_c1 = 80
IP_c2 = 90

print "auto lo"
print "iface lo inet loopback"

print "auto eth0"
print "iface eth0 inet static"
print "\taddress 192.168.%i.130" % IP_c1
print "\tnetmask 255.255.255.128"
print "\tgateway 192.168.%i.129" % IP_c1

print "auto %s %s" % (" ".join(["eth0:%i" % i for i in range(1,124)])," ".join(["eth1:%i" % i for i in range(1,128)]))

for c in [IP_c1,IP_c2] :
    if c == IP_c1 :
        for i in range(131,255) :
            print "iface eth0:%i inet static" % (i-130)
            print "\taddress 192.168.%i.%i" % (c,i)
            print "\tnetmask 255.255.255.128"
    else :
        for i in range(130,255) :
            print "iface eth1:%i inet static" % (i-129)
            print "\taddress 192.168.%i.%i" % (c,i)
            print "\tnetmask 255.255.255.128"

print "post-up ip route add default via 192.168.90.129 dev eth1 table 101"</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/add-multiple-gateways-multiple-nics-ubuntu-server/">Add Multiple Gateways to Multiple NICs on Ubuntu Server</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/add-multiple-gateways-multiple-nics-ubuntu-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">924</post-id>	</item>
		<item>
		<title>Fix Incoming Mail Delay With Postfix</title>
		<link>https://www.veriteknik.net.tr/en/fix-incoming-mail-delay-with-postfix/</link>
					<comments>https://www.veriteknik.net.tr/en/fix-incoming-mail-delay-with-postfix/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 21 Aug 2013 12:52:37 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=827</guid>

					<description><![CDATA[<p>In our case, we were using postfix via iRedMail and every incoming mail had a delay around 7 minutes. The problem was fixed by disabling the chroot operation in the settings. Edit the file /etc/postfix/master.cf It probably looks like this # ============================================================= # service type private unpriv chroot wakeup maxproc command # (yes) (yes) (yes) [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/fix-incoming-mail-delay-with-postfix/">Fix Incoming Mail Delay With Postfix</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In our case, we were using postfix via <a href="http://www.iredmail.org/" target="_blank">iRedMail</a> and every incoming mail had a delay around 7 minutes. The problem was fixed by disabling the chroot operation in the settings.</p>
<p>Edit the file /etc/postfix/master.cf</p>
<p>It probably looks like this</p>
<pre class="brush: text; gutter: true; first-line: 1"># =============================================================
    # service type  private unpriv  chroot  wakeup  maxproc command
    #               (yes)   (yes)   (yes)   (never) (100)
    # =============================================================
    smtp      inet  n       -       -       -       -       smtpd</pre>
<p>Change it to</p>
<pre class="brush: text; gutter: true; first-line: 1"># =============================================================
    # service type  private unpriv  chroot  wakeup  maxproc command
    #               (yes)   (yes)   (yes)   (never) (100)
    # =============================================================
    smtp      inet  n       -       n       -       -       smtpd</pre>
<p>Now restart and reload the postfix mail server and you&#8217;re good to go.</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@mail ~]# /etc/init.d/postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]
[root@mail ~]# /etc/init.d/postfix reload
Reloading postfix:                                         [  OK  ]</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/fix-incoming-mail-delay-with-postfix/">Fix Incoming Mail Delay With Postfix</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/fix-incoming-mail-delay-with-postfix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">827</post-id>	</item>
		<item>
		<title>Change Outgoing IP of Postfix Mail Server</title>
		<link>https://www.veriteknik.net.tr/en/change-outgoing-ip-of-postfix-mail-server/</link>
					<comments>https://www.veriteknik.net.tr/en/change-outgoing-ip-of-postfix-mail-server/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 21 Aug 2013 12:46:49 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=824</guid>

					<description><![CDATA[<p>This can get quite important when your mail server is blacklisted, or if you somehow want to simply change the outgoing IP address. First of all, check that you DO have another ip address on another interface at the server. Either by ifconfig or anything else. To change the outgoing IP on a postfix mail [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/change-outgoing-ip-of-postfix-mail-server/">Change Outgoing IP of Postfix Mail Server</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This can get quite important when your mail server is blacklisted, or if you somehow want to simply change the outgoing IP address.</p>
<p>First of all, check that you DO have another ip address on another interface at the server. Either by ifconfig or anything else.</p>
<p>To change the outgoing IP on a postfix mail server, edit the file <strong>/etc/postfix/master.cf</strong></p>
<p>Find this part in the file,</p>
<pre class="brush: text; gutter: true; first-line: 1">smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=</pre>
<p>You should modify it to look like below</p>
<pre class="brush: text; gutter: true; first-line: 1">smtp      unix  -       -       -       -       -       smtp
        -o smtp_bind_address=192.168.1.1
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_bind_address=192.168.1.1
        -o smtp_fallback_relay=</pre>
<p>Of course, change the IP address 192.168.1.1 to whatever your secondary IP is.</p>
<p>Then restart and reload the postfix server.</p>
<pre class="brush: bash; gutter: true; first-line: 1">[root@mail ~]# /etc/init.d/postfix restart
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]
[root@mail ~]# /etc/init.d/postfix reload
Reloading postfix:                                         [  OK  ]</pre>
<p>That&#8217;s it!</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/change-outgoing-ip-of-postfix-mail-server/">Change Outgoing IP of Postfix Mail Server</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/change-outgoing-ip-of-postfix-mail-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">824</post-id>	</item>
		<item>
		<title>Snort rules for isc.org and ripe.net DNS Amplification Attacks</title>
		<link>https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/</link>
					<comments>https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Sat, 16 Mar 2013 21:25:55 +0000</pubDate>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[amplification]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[isc]]></category>
		<category><![CDATA[pfsense]]></category>
		<category><![CDATA[ripe]]></category>
		<category><![CDATA[rule]]></category>
		<category><![CDATA[snort]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=783</guid>

					<description><![CDATA[<p>Everything started with a few queries of isc.org thrugh open DNS servers located at our data center. Searching through the net we found that we are not the victims but a part of  uncomprimised sources of  a huge DDoS attack. A 60 byte query will turn into 50 times larger data directed to victims IP [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/">Snort rules for isc.org and ripe.net DNS Amplification Attacks</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Everything started with a few queries of isc.org thrugh open DNS servers located at our data center. Searching through the net we found that we are not the victims but a part of  uncomprimised sources of  a huge DDoS attack. A 60 byte query will turn into 50 times larger data directed to victims IP addresses. Even we were not the victims, the attacks became threading our connection if you think of hundreds of servers each of them pushing 10 Mbits to the Net. We needed a solution to stop those attacks.</p>
<p>Finally we have found a solution to stop DNS Amplification Attacks using pfsense with snort.</p>
<p>The below codes are extracted from raw IP data, as a sample, you may check what we had done for ripe.net query:</p>
<pre>0x0000: 4500 0042 6142 4000 7911 e7c3 9a23 a00b E..BaB@.y....#..
0x0010: 5e67 200f 0035 0035 002e 0000 03b8 0100 ^g...5.5........
0x0020: 0001 0000 0000 00<span style="background-color: #ffff99;">01 <strong>0472 6970 6503 6e65</strong></span> .........<span style="background-color: #ffff99;"><strong>ripe.ne</strong></span>
0x0030: <span style="background-color: #ffff99;"><strong>74</strong></span>00 00ff 0001 0000 2910 0000 0080 0000 <span style="color: #ffff99;">t</span>.......).......
0x0040: 0000 ..</pre>
<p>Use the code below to stop DNS Amplification attacks, you can paste the code to snort interface Advanced configuration pass through section:</p>
<pre>alert udp $EXTERNAL_NET any -&gt; $HOME_NET 53 (msg:"DNS ripe.net UDP"; content:"|<span style="background-color: #ffff99;">01 04 72 69 70 65 03 6e 65 74 00</span>|";classtype:attempted-dos;sid:4000003;)
alert udp $EXTERNAL_NET any -&gt; $HOME_NET 53 (msg:"DNS isc.org UDP"; content:"|01 03 69 73 63 03 6f 72 67|";classtype:attempted-dos;sid:4000003;)</pre>
<p>The code is tested to have minimal overhead.</p>
<p>Please post your comment if you need additional DNS Amplification Attack rules.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/">Snort rules for isc.org and ripe.net DNS Amplification Attacks</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/snort-rules-for-isc-org-and-ripe-net-dns-amplification-attacks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">783</post-id>	</item>
		<item>
		<title>Firewall Settings With IpTables on CentOS and RedHat</title>
		<link>https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/</link>
					<comments>https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 08:54:37 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[iptables]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=761</guid>

					<description><![CDATA[<p>Here on this article we&#8217;ll discuss some basic methods to quickly apply to the iptables service so that you can basically get things running up. First of all, there are a couple of ways to edit the iptables infrastructure. One way is to use the /sbin/iptables binary file to append each line, or you can [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/">Firewall Settings With IpTables on CentOS and RedHat</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here on this article we&#8217;ll discuss some basic methods to quickly apply to the iptables service so that you can basically get things running up.</p>
<p>First of all, there are a couple of ways to edit the iptables infrastructure. One way is to use the <strong>/sbin/iptables</strong> binary file to append each line, or you can directly edit the <strong>/etc/sysconfig/iptables</strong> file.</p>
<p>There is basically no difference between the two methods, adding &#8220;THIS LINE&#8221; to the /etc/sysconfig/iptables file is the same thing by running the &#8220;/sbin/iptables THIS LINE&#8221; command. Just keep in mind that rules in iptables are respective, which means each rule is done in a chain order, the third line is <em>only</em> executed after the second line.</p>
<p>By default, when you install a CentOS system, the iptables will only allow connections to the 22nd port which is for obvious reasons : not to block your ssh connections. But if you change the ssh server port, or run httpd service, mail service or any other service, the default iptables rules will all incoming and outgoing connections.</p>
<p>The default settings a pretty much like this.</p>
<pre class="brush: text; gutter: true; first-line: 1"># Firewall configuration written by system-config-firewall
 # Manual customization of this file is not recommended.
 *filter
 :INPUT ACCEPT [0:0]
 :FORWARD ACCEPT [0:0]
 :OUTPUT ACCEPT [0:0]
 -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
 -A INPUT -p icmp -j ACCEPT
 -A INPUT -i lo -j ACCEPT
 -A INPUT -j REJECT --reject-with icmp-host-prohibited
 -A FORWARD -j REJECT --reject-with icmp-host-prohibited
 COMMIT</pre>
<p>Let&#8217;s say you install apache (or equivalent) on your server, then iptables will keep blocking 80 and 443 ports. To make them available, we have to add them to the ACCEPT chain before the REJECTION.</p>
<pre class="brush: text; gutter: true; first-line: 1">-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
 -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT</pre>
<p>Let&#8217;s say you want to block out a specific IP address, for any port, then you can add such line,</p>
<pre class="brush: text; gutter: true; first-line: 1">-A INPUT -s 192.168.16.29 -j DROP</pre>
<p>If you&#8217;d like to log the access attempts of this IP address, before the DROP line you can add,</p>
<pre class="brush: text; gutter: true; first-line: 1">-A INPUT -s 192.168.16.29 -m limit --limit 2/min -j LOG --log-prefix "STAY AWAY! "</pre>
<p>This line will log any attempt from the IP address 192.168.16.29 but will limit the logs. It will log any similar connection type as only two lines per minute, this way your log file won&#8217;t fill out the whole hdd. Also the &#8220;STAY AWAY!&#8221; will be on the log line, so that you can easily grep the relevant line from the log file. Don&#8217;t confuse this as a message, the line &#8220;STAY AWAY!&#8221; will NOT be sent to the blocked IP or anything, it will just be logged.</p>
<p>At the end our iptables file will be like this</p>
<pre class="brush: text; gutter: true; first-line: 1">
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -s 192.168.16.29 -m limit --limit 2/min -j LOG --log-prefix "STAY AWAY! "
-A INPUT -s 192.168.16.29 -j DROP
-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/">Firewall Settings With IpTables on CentOS and RedHat</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/firewall-settings-with-iptables-on-centos-and-redhat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">761</post-id>	</item>
	</channel>
</rss>
